Skip to content

Commit 8955121

Browse files
committed
Fixed #3778 - Unable to select month: numberOfMonths - maxDate - changeMonth combi
1 parent 10de3f0 commit 8955121

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ui/ui.datepicker.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,9 @@ $.extend(Datepicker.prototype, {
707707
if (this._isDisabledDatepicker(target[0])) {
708708
return;
709709
}
710-
this._adjustInstDate(inst, offset, period);
710+
this._adjustInstDate(inst, offset +
711+
(period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
712+
period);
711713
this._updateDatepicker(inst);
712714
},
713715

@@ -1283,6 +1285,8 @@ $.extend(Datepicker.prototype, {
12831285
}
12841286
}
12851287
}
1288+
inst.drawMonth = drawMonth;
1289+
inst.drawYear = drawYear;
12861290
var prevText = this._get(inst, 'prevText');
12871291
prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
12881292
this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),

0 commit comments

Comments
 (0)