aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-01-30 18:10:39 +0100
committerFelix Nagel <info@felixnagel.com>2013-01-30 18:10:39 +0100
commit91dde04dadcd9b314e099ced040a763aa35b7b5c (patch)
tree3572e1b71f5c8998c46e411b9d992795a1105530 /ui/jquery.ui.datepicker.js
parentde149c47d79bf5822baad786591eb837fe2af769 (diff)
parentceebe07e2c99190030c16b031813ae660d9283d1 (diff)
downloadjquery-ui-91dde04dadcd9b314e099ced040a763aa35b7b5c.tar.gz
jquery-ui-91dde04dadcd9b314e099ced040a763aa35b7b5c.zip
Merge branch 'master' into selectmenu
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()) &&