문제

please tell me how to set the range jqueryUi datepicker to select year 1950-2014.

my settings set the range of choice year 2013-2024:

$(".datepicker").datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
minDate: "-220",
});

I just tried these options:

minDate: -2200000,       2004-2024
minDate: -22000,       2004-2024
minDate: -2200000,       2013-2024
minDate: 2200,       2020-2030
minDate: 22000,       2074-2084
도움이 되었습니까?

해결책

yearRange: '1950:2014',
minDate: new Date(1950, 0, 1),
maxDate: new Date(2014, 0, 1)

Note that you can also use maxDate to explicitly specify the upper bound.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top