diff options
author | Marc Grabanski <m@marcgrabanski.com> | 2008-06-01 20:04:19 +0000 |
---|---|---|
committer | Marc Grabanski <m@marcgrabanski.com> | 2008-06-01 20:04:19 +0000 |
commit | dce035cc658a5bcbbeb7e27c6d635882e0617b93 (patch) | |
tree | 6939401ed419375be94604e82156d957a2529d3b /ui/source | |
parent | 0a2cc194d5ccd8155b9591236667cdabef87807f (diff) | |
download | jquery-ui-dce035cc658a5bcbbeb7e27c6d635882e0617b93.tar.gz jquery-ui-dce035cc658a5bcbbeb7e27c6d635882e0617b93.zip |
datepicker: changed yearRange to be relative to current year instead of selected year (fixes #2627)
Diffstat (limited to 'ui/source')
-rw-r--r-- | ui/source/ui.datepicker.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/source/ui.datepicker.js b/ui/source/ui.datepicker.js index 4676378d8..62199f7bb 100644 --- a/ui/source/ui.datepicker.js +++ b/ui/source/ui.datepicker.js @@ -1290,8 +1290,8 @@ $.extend(DatepickerInstance.prototype, { year = drawYear - 10;
endYear = drawYear + 10;
} else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
- year = drawYear + parseInt(years[0], 10);
- endYear = drawYear + parseInt(years[1], 10);
+ year = new Date().getFullYear() + parseInt(years[0], 10);
+ endYear = new Date().getFullYear() + parseInt(years[1], 10);
} else {
year = parseInt(years[0], 10);
endYear = parseInt(years[1], 10);
|