]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixed #3778 - Unable to select month: numberOfMonths - maxDate - changeMonth combi
authorKeith Wood <kbwood.au@gmail.com>
Mon, 19 Jan 2009 10:45:09 +0000 (10:45 +0000)
committerKeith Wood <kbwood.au@gmail.com>
Mon, 19 Jan 2009 10:45:09 +0000 (10:45 +0000)
ui/ui.datepicker.js

index 6ec694e478316d216cb7d95d1a39293fc1c494c9..4ac3eee68c4833a647ab840f6df62aa8b3b6c412 100644 (file)
@@ -707,7 +707,9 @@ $.extend(Datepicker.prototype, {
                if (this._isDisabledDatepicker(target[0])) {
                        return;
                }
-               this._adjustInstDate(inst, offset, period);
+               this._adjustInstDate(inst, offset +
+                       (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
+                       period);
                this._updateDatepicker(inst);
        },
 
@@ -1283,6 +1285,8 @@ $.extend(Datepicker.prototype, {
                                }
                        }
                }
+               inst.drawMonth = drawMonth;
+               inst.drawYear = drawYear;
                var prevText = this._get(inst, 'prevText');
                prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
                        this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),