Fixed 3526. Default year if not set from input field.

This commit is contained in:
Keith Wood 2008-11-07 10:13:19 +00:00
parent eb68aadf3f
commit cee6a3a96f

View File

@ -1032,7 +1032,9 @@ $.extend(Datepicker.prototype, {
checkLiteral(); checkLiteral();
} }
} }
if (year < 100) if (year == -1)
year = new Date().getFullYear();
else if (year < 100)
year += new Date().getFullYear() - new Date().getFullYear() % 100 + year += new Date().getFullYear() - new Date().getFullYear() % 100 +
(year <= shortYearCutoff ? 0 : -100); (year <= shortYearCutoff ? 0 : -100);
if (doy > -1) { if (doy > -1) {