Ticket #7098 (open bug)
Broken handling of four digit years before year 100
| Reported by: | Lexiyntax | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.11.0 |
| Component: | ui.datepicker | Version: | 1.8.10 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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.
Change History
comment:2 in reply to: ↑ 1 Changed 2 years ago by bombo
Setting shortYearCutoff to 0 does not seem to do the trick. In fact it seems to result in some strange behavior in terms of emulating shortYearCutoff: 21 or 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/2001 internally, as can be seen when doing so and pressing Show date.
comment:4 Changed 7 months ago by mikesherov
- Status changed from new to open
confirmed on latest: http://jsfiddle.net/LgVqM/7/


Because Datapicker has shortYearCutoff and default value is +10. If you want to use Datapicker on historical data application, please try shortYearCutoff: 0.
http://jqueryui.com/demos/datepicker/#option-shortYearCutoff