I am creating a date picker by using pickaday
but I'm getting stucked and confused with maxDate
functionality. I set maxDate
7 years back but when I click on input to select date it shows me current month and year with all dates disabled, I want to show calender should show date which i set in maxDate
. Please check my code below or you can check fiddle also https://jsfiddle.net/buffqvye/
HTML
<input type="text" id="datepicker">
SCRIPT
var picker = new Pikaday(
{
field: document.getElementById('datepicker'),
firstDay: 1,
minDate: new Date(2000, 0, 1),
maxDate: new Date(2009, 12, 31),
yearRange: [2000,2009]
});