#30819: Locales that are by default set to use two digits year will show invalid
year on date picker UI
----------------------------------+--------------------------------------
Reporter: Aldian Fazrihady | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.2
Severity: Normal | Resolution:
Keywords: datepicker | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
----------------------------------+--------------------------------------
Description changed by Aldian Fazrihady:
Old description:
> 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:
> [[Image(https://drive.google.com/file/d/17KEkY89TqimwJIJ0kz-
> b2IJpYETpd46g/view?usp=sharing)]]
>
> 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 FORMATE_MODULE_PATH. Now datepicker shows the
> correct year.
>
> However, it is quite clear that there is a bug in the datepicker display
> that happens when two digits year format is used.
New description:
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:
[[Image(https://drive.google.com/file/d/17KEkY89TqimwJIJ0kz-
b2IJpYETpd46g/view?usp=sharing)]]
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.
However, it is quite clear that there is a bug in the datepicker display
that happens when two digits year format is used.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.483fb0e11ccbe491d7f382c14de60319%40djangoproject.com.