jquery-ui-month-picker
jquery-ui-month-picker copied to clipboard
MinMonth and MaxMonth aren't working with jQuery 3.6.0 and jQuery UI 1.12.0
In the official demo file, after I changed the versions of jQuery and jQuery UI to 3.6.0 and 1.12.0, respectively, the months and years which are outside the range set by MinMonth
and MaxMonth
can be selected.
If anyone is still interested, we have been able to fix this by changing two lines in the _decorateButtons
method:
Original:
_setDisabled(this._prevButton, _minDate && _curYear == _toYear(_minDate));
_setDisabled(this._nextButton, _maxDate && _curYear == _toYear(_maxDate));
Fixed:
_setDisabled(this._prevButton, _minDate != null && _curYear == _toYear(_minDate));
_setDisabled(this._nextButton, _maxDate != null && _curYear == _toYear(_maxDate));