Skip to main content

Search and Top Navigation

#7831 closed feature (wontfix)

Opened November 03, 2011 11:20AM UTC

Closed October 19, 2012 07:21PM UTC

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:
Description

The fix for ticket [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.

Attachments (0)
Change History (2)

Changed October 11, 2012 02:43PM UTC by scottgonzalez comment:1

milestone: 1.9.01.11.0

Changed October 19, 2012 07:21PM UTC by mikesherov comment:2

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.