Skip to main content

Search and Top Navigation

#7244 closed bug (fixed)

Opened April 12, 2011 05:04PM UTC

Closed June 28, 2011 09:43PM UTC

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

Attachments (0)
Change History (6)

Changed May 13, 2011 08:55PM UTC by fracmak comment:1

patch submitted through github

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

Changed May 18, 2011 03:33PM UTC by Jörn Zaefferer comment:2

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

Changed May 18, 2011 03:36PM UTC by Jörn Zaefferer comment:3

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

Changed May 18, 2011 03:36PM UTC by jzaefferer comment:4

milestone: 1.91.8.14

Changed June 27, 2011 10:47PM UTC by jzaefferer comment:5

milestone: 1.8.14
resolution: fixed
status: closedreopened

Changed June 28, 2011 09:43PM UTC by Philip Graham comment:6

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