According to the documentation for the datepicker, the yearRange property determines the range shown in the dropdown (which using the code below is -10 years, +10 years from the currently selected date). Is there a way to change this to 80 years in the past, zero years in the future. Is there something else I need to do to increase the range of dates shown?
$('.datePicker, .datePicker').datepicker({
minDate: new Date(1930,1,1,0,0,0),
yearRange: '-80+0',
dateFormat: 'dd-mm-yy',
showOn: 'both',
direction: 'left',
buttonImageOnly: true,
changeMonth: true,
changeYear: true,
buttonImage: '/Images/calendar_16.png' })开发者_运维百科;
Try
yearRange: '-80:+0',
// ^
精彩评论