aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-12-05 10:38:31 -0500
committerScott González <scott.gonzalez@gmail.com>2012-12-05 10:38:31 -0500
commit598cdae199fed9b3aa1700142e8e00a61fc6e61a (patch)
tree1508b6a39893fcf645f35afa8aa865e99e8c8cf2 /ui/jquery.ui.datepicker.js
parent3c2acc322782cc08e575405f8123029342e33542 (diff)
downloadjquery-ui-598cdae199fed9b3aa1700142e8e00a61fc6e61a.tar.gz
jquery-ui-598cdae199fed9b3aa1700142e8e00a61fc6e61a.zip
Datepicker: Handle changes to the disabled option. Fixes #8883 - Datepicker: Changing disabled option doesn't work.
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 9f480bf38..4ab1fa201 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -497,6 +497,13 @@ $.extend(Datepicker.prototype, {
if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
inst.settings.maxDate = this._formatDate(inst, maxDate);
}
+ if ( "disabled" in settings ) {
+ if ( settings.disabled ) {
+ this._disableDatepicker(target);
+ } else {
+ this._enableDatepicker(target);
+ }
+ }
this._attachments($(target), inst);
this._autoSize(inst);
this._setDate(inst, date);