Instead of showing year 2019, it shows year 1919.
My workaround for this problem is to use 4 digits year for that locale by
configuring FORMATE_MODULE_PATH.
However, it is quite clear that there is a bug in the datepicker display.
--
Ticket URL: <https://code.djangoproject.com/ticket/30819>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "Screenshot from 2019-09-30 18-36-39.png" added.
screenshot
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.
>
> My workaround for this problem is to use 4 digits year for that locale by
> configuring FORMATE_MODULE_PATH.
>
> However, it is quite clear that there is a bug in the datepicker display.
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).
Therefore, my workaround for this problem is to use 4 digits year for that
locale by configuring FORMATE_MODULE_PATH.
However, it is quite clear that there is a bug in the datepicker display.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:1>
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).
>
> Therefore, my workaround for this problem is to use 4 digits year for
> that locale by configuring FORMATE_MODULE_PATH.
>
> However, it is quite clear that there is a bug in the datepicker display.
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 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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:2>
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>
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 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.
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 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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:4>
* ui_ux: 1 => 0
* component: contrib.admin => Internationalization
* version: 2.2 => 3.0
* stage: Unreviewed => Accepted
Comment:
I agree we should prioritize date formats with 4-digits year in `id`
locales, e.g.
{{{
diff --git a/django/conf/locale/id/formats.py
b/django/conf/locale/id/formats.py
index 1458230c28..de2d1535ff 100644
--- a/django/conf/locale/id/formats.py
+++ b/django/conf/locale/id/formats.py
@@ -14,8 +14,8 @@ FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see https://docs.python.org/library/datetime.html#strftime-strptime-
behavior
DATE_INPUT_FORMATS = [
- '%d-%m-%y', '%d/%m/%y', # '25-10-09', 25/10/09'
'%d-%m-%Y', '%d/%m/%Y', # '25-10-2009', 25/10/2009'
+ '%d-%m-%y', '%d/%m/%y', # '25-10-09', 25/10/09'
'%d %b %Y', # '25 Oct 2006',
'%d %B %Y', # '25 October 2006'
]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:5>
* status: new => assigned
* owner: nobody => Aldian Fazrihady
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:6>
* easy: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:7>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:8>
* needs_better_patch: 0 => 1
* version: 3.0 => master
* component: Internationalization => contrib.admin
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:9>
* owner: Aldian Fazrihady => Farhaan Bukhsh
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:10>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"550357771b592568399eda08556bb2a749da69fe" 55035777]:
{{{
#!CommitTicketReference repository=""
revision="550357771b592568399eda08556bb2a749da69fe"
Refs #30819 -- Prioritized the date format with four-digit year for the
Indonesian (id) locale.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:11>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"cf5d4701dc12ad69d51042b0d7e81e4a54de4bd7" cf5d4701]:
{{{
#!CommitTicketReference repository=""
revision="cf5d4701dc12ad69d51042b0d7e81e4a54de4bd7"
Fixed #30819 -- Fixed year determination in admin calendar widget for two-
digit years.
Two-digit years in the range of [00, 68] are in the current century,
while [69,99] are in the previous century, according to the Open Group
Specification.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30819#comment:12>