Opened 12 years ago

Closed 12 years ago

#7244 closed bug (fixed)

Datepicker: parseDate() does not throw an exception for long years

Reported by: orionll Owned by:
Priority: minor Milestone:
Component: ui.datepicker Version: 1.8.11
Keywords: Cc:
Blocked by: Blocking:

Description

$.datepicker.parseDate('dd/mm/yy', '18/04/19881') returns "Mon Apr 18 1988" instead of throwing an exception

Google Chrome 10 and Mozilla Firefox 4, Windows 7

Change History (6)

comment:1 Changed 12 years ago by fracmak

patch submitted through github

https://github.com/jquery/jquery-ui/pull/270

comment:2 Changed 12 years ago by Jörn Zaefferer

Resolution: fixed
Status: newclosed

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

Changeset: 92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b

comment:3 Changed 12 years ago by Jörn Zaefferer

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 (cherry picked from commit 92b0f6702a9408f4bd7d71ccca7e0e851d0efc6b)

Changeset: e05559eb162b0a3b1c090604a144262de2f9a5d3

comment:4 Changed 12 years ago by Jörn Zaefferer

Milestone: 1.91.8.14

comment:5 Changed 12 years ago by Jörn Zaefferer

Milestone: 1.8.14
Resolution: fixed
Status: closedreopened

comment:6 Changed 12 years ago by Philip Graham

Resolution: fixed
Status: reopenedclosed

Updated guard against unparsed characters to allow extra characters as long as they are separated from the date by whitespace. This maintains compatibility with timepicker extensions.

Fixes #7244 - Datepicker: parseDate() does not throw an exception for long years

Changeset: 76e2b98a312cfab3d754aac5068ad965e544840c

Note: See TracTickets for help on using tickets.