Search and Top Navigation
#8353 closed bug (fixed)
Opened May 25, 2012 03:38PM UTC
Closed July 14, 2014 01:35PM UTC
Last modified July 14, 2014 01:36PM UTC
Datepicker: parseDate accepts dates with two year digits with format 'mm/dd/yy' which should require four year digits
Reported by: | andrewwhitaker | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.1 |
Component: | ui.datepicker | Version: | 1.8.20 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
var d = "12/12/12"; var parsed = $.datepicker.parseDate("mm/dd/yy", d); // yields 12/12/2012, should not succeed.
Example: http://jsfiddle.net/WWJfn/
An exception should be thrown here instead of the date being parsed successfully.
Attachments (0)
Change History (13)
Changed October 11, 2012 02:45PM UTC by comment:1
milestone: | 1.9.0 → 1.11.0 |
---|
Changed October 19, 2012 08:23PM UTC by comment:2
priority: | minor → undetermined |
---|---|
status: | new → open |
Changed October 19, 2012 08:23PM UTC by comment:3
Changed October 19, 2012 09:00PM UTC by comment:4
priority: | undetermined → minor |
---|
Changed November 30, 2012 05:09PM UTC by comment:5
summary: | parseDate accepts dates with two year digits with format 'mm/dd/yy' which should require four year digits. → Datepicker: parseDate accepts dates with two year digits with format 'mm/dd/yy' which should require four year digits |
---|
Still an issue as of 1.9.2 - http://jsfiddle.net/tj_vantoll/en69t/.
Changed April 09, 2013 09:25PM UTC by comment:6
Any chance of getting this fixed sooner than later please? We're using this in a date range control and the user input is getting messed up because we depend on parseDate to return a valid value only when the format matches the input.
If there's a workaround, it would be greatly appreicated. Thank you.
Changed April 09, 2013 10:11PM UTC by comment:7
@PRISMAY If it's a blocker for you, then it seems it would be beneficial for you to dig in, track down the bug, figure out a fix, and submit a pull request.
Changed August 27, 2013 05:37PM UTC by comment:9
Replying to [comment:6 PRISMAY]:
Any chance of getting this fixed sooner than later please? We're using this in a date range control and the user input is getting messed up because we depend on parseDate to return a valid value only when the format matches the input. If there's a workaround, it would be greatly appreicated. Thank you.
Hi, i had a problem like yours and using something like this http://jsfiddle.net/FDAkp/
inside the jquery ui js solved my problem.
Excuse me if i'm doing it the wrong way and drop it.
Changed May 16, 2014 12:42AM UTC by comment:10
Submitted a pull request for this bug:
Changed June 24, 2014 11:44PM UTC by comment:11
milestone: | 1.11.0 → none |
---|
Changed July 14, 2014 01:35PM UTC by comment:12
resolution: | → fixed |
---|---|
status: | open → closed |
Datepicker: reject dates with two year digits when expecting 'yy'
Fixes #8353
Closes gh-1248
Changeset: 573037423822fa04a1888e3bcc52243b9324c5e2
Changed July 14, 2014 01:36PM UTC by comment:13
milestone: | none → 1.11.1 |
---|