I think I have a reason .. This is because yearRange: just limit the range only in the dropdown menu. He just changes the list with nothing else.
They are a mansion here.
http://jqueryui.com/demos/datepicker/#option-yearRange [Note that this option only affects what appears in the drop-down list to limit which dates can be selected using the minDate and / or maxDate.]
To verify this, set the date selector as shown below and you will find all dates that have been disabled. because he saws us the calender of 2012, not 1994
$('.datePicker').datepicker({ dateFormat: 'yy-mm-dd', changeYear: true, changeMonth: true, yearRange: "-18:-12", maxDate: new Date(2012,1-1,1) });
To fix this, you should use defaultDate as well as minDate and maxDate
I hope I understand.
source share