#13591 closed (worksforme)
SplitDateTimeField admin usability broken when using format localization
Reported by: | Ludwik Trammer | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.2 |
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 |
Easy pickings: | no | UI/UX: | no |
Description
The issue:
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".
Proposed resolution:
When USE_L10N is turned on, the value should always be localized.
Change History (8)
comment:1 by , 15 years ago
milestone: | → 1.3 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Cc: | added |
---|
comment:3 by , 14 years ago
Cc: | added |
---|
comment:4 by , 14 years ago
comment:7 by , 14 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
We have validated, the failure occurs until version 1.2.1.
From version 1.2.2 onwards is solved.
(fisadev and croldan from pyar on Rafaela Django Sprint 2010)
This appears to be a fault in the Admin widgets specifically (i.e., AdminSplitDateTime), not SplitDateTimeField.