From dce035cc658a5bcbbeb7e27c6d635882e0617b93 Mon Sep 17 00:00:00 2001 From: Marc Grabanski Date: Sun, 1 Jun 2008 20:04:19 +0000 Subject: datepicker: changed yearRange to be relative to current year instead of selected year (fixes #2627) --- ui/source/ui.datepicker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/source') 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); -- cgit v1.2.3