aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 428a24043..437dca283 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -259,7 +259,7 @@ $.extend(Datepicker.prototype, {
return this._get(inst, key);
});
$.data(target, PROP_NAME, inst);
- this._setDate(inst, this._getDefaultDate(inst));
+ this._setDate(inst, this._getDefaultDate(inst), true);
this._updateDatepicker(inst);
this._updateAlternate(inst);
},
@@ -1302,7 +1302,7 @@ $.extend(Datepicker.prototype, {
},
/* Set the date(s) directly. */
- _setDate: function(inst, date) {
+ _setDate: function(inst, date, noChange) {
var clear = !(date);
var origMonth = inst.selectedMonth;
var origYear = inst.selectedYear;
@@ -1310,7 +1310,7 @@ $.extend(Datepicker.prototype, {
inst.selectedDay = inst.currentDay = date.getDate();
inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
- if (origMonth != inst.selectedMonth || origYear != inst.selectedYear)
+ if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
this._notifyChange(inst);
this._adjustInstDate(inst);
if (inst.input) {