SplitDateTimeField admin usability broken when using format localization
|Reported by:||Ludwik Trammer||Owned by:||nobody|
|Severity:||Keywords:||localization, SplitDateTimeField, admin|
|Cc:||Jannis Leidel, andy@…, rodrigo@…||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When using SplitDateTimeField (and probably other types of date fields) in admin with calendar widget and with format localization turned on, date format goes back and forth between localized and unlocalized version, utterly confusing the user.
Steps to reproduce:
Set USE_L10N to True and LANGUAGE_CODE to de (German). Go to admin interface and try editing an object from a model with SplitDateTimeField. At first the date will be formated as "YYYY-MM-DD" (ie. unlocalized), but after clicking "Today", or anything else in calendar, the format will switch to localized "DD.MM.YYYY". The sudden format switch is really confusing. After saving, it switches again to "YYYY-MM-DD".
When USE_L10N is turned on, the value should always be localized.
Change History (8)
comment:1 Changed 6 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|