Opened 11 years ago

Closed 10 years ago

#7831 closed feature (wontfix)

parseDate() regression since #7244 fix

Reported by: ngavalda Owned by:
Priority: minor Milestone: 1.11.0
Component: ui.datepicker Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:


The fix for ticket 7244 introduced, in my sense, a regression. I can't reopen it, that's why i'm filing this as a new issue.

I'm upgrading jQuery UI from 1.8.7 to 1.8.16. I used to call parseDate() providing a full-format value (directly from my data), like $.datepicker.parseDate('yy-mm-dd', '2011-07-01T00:00:00.000+02:00'), which worked perfectly, ignoring extra characters (as does Java's DateFormat.parseDate(), for instance).

Since that fix, the same instructions throw an exception 'Extra/unparsed characters found in date: T00:00:00.000+02:00'.

I would have expected that this behavior was configurable, for instance with a 'lenient' boolean parameter in the settings map. When true, extra characters are ignored, and when false, any extra character throws an exception.

The default value of this parameter could be debated. If backward-compatibility is privileged, the default should be true.

Change History (2)

comment:1 Changed 10 years ago by Scott González


comment:2 Changed 10 years ago by mikesherov

Resolution: wontfix
Status: newclosed
Type: bugfeature

There are ample workarounds in listed in #7244, please use one of them as the behavior introduced in 7244 is intentional and desired.

Note: See TracTickets for help on using tickets.