diff options
author | Keith Wood <kbwood.au@gmail.com> | 2008-11-07 10:13:19 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2008-11-07 10:13:19 +0000 |
commit | cee6a3a96fdab9854a73f291ac86c9c90a8b2469 (patch) | |
tree | 5aeea05e03639cb21100718276b302249c463ff1 /ui | |
parent | eb68aadf3f028c64f234d01d09f4a7c61307ca4f (diff) | |
download | jquery-ui-cee6a3a96fdab9854a73f291ac86c9c90a8b2469.tar.gz jquery-ui-cee6a3a96fdab9854a73f291ac86c9c90a8b2469.zip |
Fixed 3526. Default year if not set from input field.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.datepicker.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index 35428c64b..9570729d5 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -1032,7 +1032,9 @@ $.extend(Datepicker.prototype, { checkLiteral(); } } - if (year < 100) + if (year == -1) + year = new Date().getFullYear(); + else if (year < 100) year += new Date().getFullYear() - new Date().getFullYear() % 100 + (year <= shortYearCutoff ? 0 : -100); if (doy > -1) { |