diff options
author | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-05-07 04:28:19 +0900 |
---|---|---|
committer | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-05-07 04:53:37 +0900 |
commit | 4585182c703ba93e0cbb059319862c53e177f836 (patch) | |
tree | d3405b4b39c9d448917d658dd84bd6e031d3e20d /ui/jquery.ui.datepicker.js | |
parent | af5b5b19483a0a18abe1fbb43cb534a5485f0804 (diff) | |
download | jquery-ui-4585182c703ba93e0cbb059319862c53e177f836.tar.gz jquery-ui-4585182c703ba93e0cbb059319862c53e177f836.zip |
Datepicker: Disabled datepicker should disable own select element too. Fixed #6850 - Disable datepicker should disable month and year dropdowns.
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 92c005d19..98baf65ab 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 |