Fixes #7244 - Datepicker: parseDate() does not throw an exception for long years
equals(time, "089");
});
+test('Ticket #7244: date parser does not fail when too many numbers are passed into the date function', function() {
+ expect(1);
+ try{
+ var date = $.datepicker.parseDate('dd/mm/yy', '18/04/19881');
+ }catch(e){
+ ok("invalid date detected");
+ }
+});
+
})(jQuery);
checkLiteral();
}
}
+ if (iValue < value.length){
+ throw "Extra/unparsed characters found in date: " + value.substring(iValue);
+ }
if (year == -1)
year = new Date().getFullYear();
else if (year < 100)