From cee6a3a96fdab9854a73f291ac86c9c90a8b2469 Mon Sep 17 00:00:00 2001 From: Keith Wood Date: Fri, 7 Nov 2008 10:13:19 +0000 Subject: [PATCH] Fixed 3526. Default year if not set from input field. --- ui/ui.datepicker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {