diff options
author | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-05-07 04:28:19 +0900 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-05-11 15:33:16 -0400 |
commit | 2b84107b3149631f6f09b69af9bc3a61be32b7c2 (patch) | |
tree | cc3d25088e4ae088cd7258f8260a7ba263ad681e /ui/jquery.ui.datepicker.js | |
parent | 3edda96f2a65a5c9544eab2b736dcd8b84edd8db (diff) | |
download | jquery-ui-2b84107b3149631f6f09b69af9bc3a61be32b7c2.tar.gz jquery-ui-2b84107b3149631f6f09b69af9bc3a61be32b7c2.zip |
Datepicker: Disabled datepicker should disable own select element too. Fixed #6850 - Disable datepicker should disable month and year dropdowns.
(cherry picked from commit 4585182c703ba93e0cbb059319862c53e177f836)
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r-- | ui/jquery.ui.datepicker.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 3e98dd6f4..419e6b84b 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -364,6 +364,8 @@ $.extend(Datepicker.prototype, { else if (nodeName == 'div' || nodeName == 'span') { var inline = $target.children('.' + this._inlineClass); inline.children().removeClass('ui-state-disabled'); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + removeAttr("disabled"); } this._disabledInputs = $.map(this._disabledInputs, function(value) { return (value == target ? null : value); }); // delete entry @@ -387,6 +389,8 @@ $.extend(Datepicker.prototype, { else if (nodeName == 'div' || nodeName == 'span') { var inline = $target.children('.' + this._inlineClass); inline.children().addClass('ui-state-disabled'); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + attr("disabled", "disabled"); } this._disabledInputs = $.map(this._disabledInputs, function(value) { return (value == target ? null : value); }); // delete entry |