There is such code:

$('#cnp_0').datepicker({ dateFormat: 'dd.mm.yy', maxDate: "+180", firstDay: 1, defaultDate: '01.01.1982', constraintInput: true, yearRange: "-84:+0", changeYear: true, changeMonth: true, minDate: 'yy' - 70, onSelect: function (date) { calculateDate(date, $('#cnp_0')); }, onClose:function(evt, ui){ check.call(this, dateReg); } }); 

Under Windows everything is good in each browser

Under Mac in Chrome and Safari, I see all the possible options for choosing years in the full height of the browser. In Firefox, this is not observed. If I kill the yearRange, everything works well, but then I can choose a year in a certain area (if I chose 1982, I can choose between 1972 and 1992)

Help solve

    1 answer 1

    Try using exact lower bound.

     $('#cnp_0').datepicker({ dateFormat: 'dd.mm.yy', maxDate: "+180", firstDay: 1, defaultDate: '01.01.1982', constraintInput: true, yearRange: "1946:+0", changeYear: true, changeMonth: true, minDate: 'yy' - 70, onSelect: function (date) { calculateDate(date, $('#cnp_0')); }, onClose:function(evt, ui){ check.call(this, dateReg); } }); 

    You also initially minDate higher than the lower limit of choice.

    • I 'll try, thanks - Nikita Shchypylov
    • Unfortunately it did not help. Everything is so sausage in the full height of the browser - Nikita Shchypylov