The question is the in title. When I am showing the year list in Jquery-UI datepicker, can I control what year the list starts with?
UPDATED CODE
$(".datepicker").datepicker({
changeYear: true,
dateFormat: 'dd-M-yy',
altFormat: 'dd-M-yy',
minDate: '2001-01-01',
duration: ''
});
I need the year list to start with 2001. Is this possible with this control? The code above doesn’t achieve this.
You could accomplish it a couple of different ways:
datepicker1includes adefaultDatebut it doesn’t have to. If you leave it out, it will default to today’s date and the year select will start with the current year.Note that
datepicker2includes the default year range in the year select box.yearRange
http://jsfiddle.net/ymvNT/