diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-05-18 17:30:26 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-05-18 17:30:26 +0200 |
commit | 92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b (patch) | |
tree | 6a0106d385c8d69dbc05cbe082dd5e109d0f29d0 /tests/unit | |
parent | ba6dd5c1805c44998baf3413c7cd37cce9416c96 (diff) | |
download | jquery-ui-92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b.tar.gz jquery-ui-92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b.zip |
There's no guard against unparsed characters at the end of the date string, any extra characters are just ignored
Fixes #7244 - Datepicker: parseDate() does not throw an exception for long years
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/datepicker/datepicker_tickets.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/datepicker/datepicker_tickets.js b/tests/unit/datepicker/datepicker_tickets.js index 2b9ce05de..d5249f905 100644 --- a/tests/unit/datepicker/datepicker_tickets.js +++ b/tests/unit/datepicker/datepicker_tickets.js @@ -29,4 +29,13 @@ test('Ticket 6827: formatDate day of year calculation is wrong during day lights 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); |