aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 24f0d5405..e93f596fc 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1918,8 +1918,14 @@ $.extend(Datepicker.prototype, {
if (years){
yearSplit = years.split(":");
currentYear = new Date().getFullYear();
- minYear = parseInt(yearSplit[0], 10) + currentYear;
- maxYear = parseInt(yearSplit[1], 10) + currentYear;
+ minYear = parseInt(yearSplit[0], 10);
+ maxYear = parseInt(yearSplit[1], 10);
+ if ( yearSplit[0].match(/[+\-].*/) ) {
+ minYear += currentYear;
+ }
+ if ( yearSplit[1].match(/[+\-].*/) ) {
+ maxYear += currentYear;
+ }
}
return ((!minDate || date.getTime() >= minDate.getTime()) &&