Ticket #7244 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 3 years ago by fracmak

patch submitted through github

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

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

  • Status changed from new to closed
  • Resolution set to fixed

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 3 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 3 years ago by joern.zaefferer

  • Milestone changed from 1.9 to 1.8.14

comment:5 Changed 3 years ago by joern.zaefferer

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Milestone 1.8.14 deleted

comment:6 Changed 3 years ago by Philip Graham

  • Status changed from reopened to closed
  • Resolution set to fixed

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.