Reputation: 8208
I want to use a ngb-datepicker in my application. According to this documentation, this compnent has a startDate input that controls the initial date of the calendar. I can't figure out how to set this date. Since there are no examples using this input, I have to guess. I've tried each of these lines, but they don't work.
<ngb-datepicker startDate="2018-11-01"></ngb-datepicker>
<ngb-datepicker startDate="{ year: 2018; month: 11; }"></ngb-datepicker>
<ngb-datepicker startDate.year="2018" startDate.month="11"></ngb-datepicker>
How do I do this?>
Upvotes: 0
Views: 2947
Reputation: 4890
They do show it in the documentation. It's in the Overview section, the "Move Around" subparagraph. And it's like this:
<ngb-datepicker [startDate]="{year: 2018, month: 11}"
Upvotes: 3