Search and Top Navigation
#7098 open bug ()
Opened March 10, 2011 07:42PM UTC
Last modified November 26, 2013 04:18PM UTC
Datepicker: Broken handling of four digit years before year 100
Reported by: | Lexiyntax | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.datepicker | Version: | 1.8.10 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When entering an early four-digit year, i.e. 03/04/11, it will be translated to 03/04/2011 in the year browser. This is incorrect; a four digit year of 03/04/11 must be 03/04/0011 in the four digit year format and shown as such. Additionally, trying to manually correct it using 03/04/0011 still shows the wrong date picker, for 2011 instead of 0011.
This bug makes it impossible to correctly browse and enter early dates for historical data entry and processing.
Attachments (0)
Change History (8)
Changed May 04, 2011 06:11PM UTC by comment:1
Changed May 13, 2011 09:47AM UTC by comment:2
Setting
shortYearCutoffto
0does not seem to do the trick. In fact it seems to result in some strange behavior in terms of emulating
shortYearCutoff: 21or something like that.
Here is a jsfiddle sample, reproducing said behavior:
http://jsfiddle.net/bombo/47f7D/24/
Even when inputting
01/01/0001, the datepicker seems to store
01/01/2001internally, as can be seen when doing so and pressing ''Show date''.
Changed October 11, 2012 02:43PM UTC by comment:3
milestone: | 1.9.0 → 1.11.0 |
---|
Changed October 19, 2012 04:50PM UTC by comment:4
status: | new → open |
---|
confirmed on latest: http://jsfiddle.net/LgVqM/7/
Changed August 07, 2013 09:27PM UTC by comment:6
milestone: | 1.11.0 → none |
---|---|
summary: | Broken handling of four digit years before year 100 → Datepicker: Broken handling of four digit years before year 100 |
Test case from brunobg in #9488: http://jsfiddle.net/NYNCh/.
Changed November 26, 2013 04:18PM UTC by comment:8
Sent a pull request with the fix: https://github.com/jquery/jquery-ui/pull/1142
Because Datapicker has
and default value is . If you want to use Datapicker on historical data application, please try .http://jqueryui.com/demos/datepicker/#option-shortYearCutoff