Opened 6 years ago
Last modified 6 years ago
#30819 closed Bug
Locales that are by default set to use two digits year will show invalid year on date picker UI — at Version 4
| Reported by: | Aldian Fazrihady | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | datepicker |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
I am using id locale. Somehow, on that locale, the django admin uses two digits year to be displayed in input fields.
The datepicker UI will display this wrong year:
Instead of showing year 2019, it shows year 1919.
If I changed the locale to en, the datepicker will display the correct year (2019). I also noticed that en by default uses 4 digits year in input fields.
Therefore, my workaround for this problem is to use 4 digits year for that locale by configuring FORMAT_MODULE_PATH. Now datepicker shows the correct year on id locale.
However, it is quite clear that there is a bug in the datepicker display that happens when two digits year format is used.
Change History (5)
by , 6 years ago
| Attachment: | Screenshot from 2019-09-30 18-36-39.png added |
|---|
comment:1 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 6 years ago
| Description: | modified (diff) |
|---|
screenshot