aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorKeith Wood <kbwood.au@gmail.com>2010-01-29 08:09:03 +0000
committerKeith Wood <kbwood.au@gmail.com>2010-01-29 08:09:03 +0000
commitf214b708894ef2a1607050977f9698cf0d916d43 (patch)
tree29b10d07b00593cc0fd55deb1986aef738fd2eb0 /ui
parentb144b7644bc5796199930c8a4300dee57ee3566c (diff)
downloadjquery-ui-f214b708894ef2a1607050977f9698cf0d916d43.tar.gz
jquery-ui-f214b708894ef2a1607050977f9698cf0d916d43.zip
Datepicker: Fixed conflict between beforeShowDay and getDate
http://forum.jquery.com/topic/several-breaking-changes-in-jquery-ui-1-8rc1
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.datepicker.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index ffd20db2d..789afe1f1 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -603,6 +603,7 @@ $.extend(Datepicker.prototype, {
}
var beforeShow = $.datepicker._get(inst, 'beforeShow');
extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
+ inst.lastVal = null;
$.datepicker._lastInput = input;
$.datepicker._setDateFromField(inst);
if ($.datepicker._inDialog) // hide cursor
@@ -1224,9 +1225,11 @@ $.extend(Datepicker.prototype, {
/* Parse existing date and initialise date picker. */
_setDateFromField: function(inst, noDefault) {
+ if (inst.input.val() == inst.lastVal) {
+ return;
+ }
var dateFormat = this._get(inst, 'dateFormat');
- inst.lastVal = inst.input ? inst.input.val() : null;
- var dates = inst.lastVal;
+ var dates = inst.lastVal = inst.input ? inst.input.val() : null;
var date, defaultDate;
date = defaultDate = this._getDefaultDate(inst);
var settings = this._getFormatConfig(inst);