Reputation: 2354
I want run Boostrap datepicker with mindate and year range but there is a problem with these options.When run the following code year range not display.
How to solve this?
$(datePiker).datepicker({
dateFormat: "yy/mm/dd",
changeMonth: true,
changeYear: true,
yearRange: "-100:-13",
defaultDate: "-13y",
minDate: 5,
});
Upvotes: 1
Views: 60
Reputation: 2354
I set exactly yearRange and defaultDate then solved.
$(datePiker).datepicker({
dateFormat: "yy/mm/dd",
changeMonth: true,
changeYear: true,
yearRange: "2000/01/01:2010/01/01",
defaultDate: "2000/01/01",
minDate: 5,
});
Upvotes: 0
Reputation: 1962
First, I think there is a problem with the dateFormat
. Also, instead of minDate
use startDate
See this website, it may help you.
Upvotes: 1