diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-05-11 12:32:29 -0700 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-05-11 12:32:29 -0700 |
commit | caca915888133f70ad9ab13a3b84f9d95b07fcb9 (patch) | |
tree | 092df426cc3559d8e5b38fbd5c7ac246cd0e257d /ui/jquery.ui.datepicker.js | |
parent | ffc983248d7b71fba4ea0aa271fb71e3202e93dc (diff) | |
parent | 4585182c703ba93e0cbb059319862c53e177f836 (diff) | |
download | jquery-ui-caca915888133f70ad9ab13a3b84f9d95b07fcb9.tar.gz jquery-ui-caca915888133f70ad9ab13a3b84f9d95b07fcb9.zip |
Merge pull request #220 from kzys/trac-6850
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 aec740aa5..e9955ce79 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 |