Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#13591 closed (worksforme)

SplitDateTimeField admin usability broken when using format localization

Reported by: ludwik Owned by: nobody
Component: Forms Version: 1.2
Severity: Keywords: localization, SplitDateTimeField, admin
Cc: jezdez, andy@…, rodrigo@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 Changed 5 years ago by russellm

  • milestone set to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

This appears to be a fault in the Admin widgets specifically (i.e., AdminSplitDateTime), not SplitDateTimeField.

comment:2 Changed 5 years ago by andybak

  • Cc andy@… added

comment:3 Changed 5 years ago by rodrigo

  • Cc rodrigo@… added

comment:4 Changed 5 years ago by jezdez

I haven't been able to reproduce this with the current trunk and 1.2.X branch, and I believe it's been fixed in r13484 and r13486.

Can you confirm this?

comment:5 Changed 5 years ago by thejaswi_puthraya

Can't reproduce the issue on trunk. It seems to have been fixed.

comment:6 Changed 5 years ago by ik

I also can't reproduce it.

comment:7 Changed 5 years ago by croldan

  • Resolution set to worksforme
  • Status changed from new to 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)

comment:8 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top