Opened 8 years ago

Closed 7 years ago

Last modified 5 years ago

#7656 closed (fixed)

Change superclass of AdminDateWidget from TextInput to DateTimeInput

Reported by: jamesbeard Owned by: Jannis Leidel
Component: contrib.admin Version: master
Severity: Keywords: date widget text format i18n-rf
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: UI/UX:

Description

Can we change the superclass of the newforms-admin contrib.admin.widgets.AdminDateWidget from TextInput to DateTimeInput?

The TextInput doesn't currently take any notice of newforms.fields.DEFAULT_DATE_INPUT_FORMATS. Changing it would cause existing date fields to render properly without having to patch Django locally or override half the admin framework. Unless there is another way that I've missed?

There is a related issue with the Javascript date helpers, but these can be easily overridden in an extraheader block.

Refer to Django developers post at http://tinyurl.com/5w3lmf for some more details.

Attachments (3)

admin_widgets.diff (1.1 KB) - added by Alex Gaynor 8 years ago.
Updates admin widgets to subclass DateTimeInput
patch_django_7656.20090207.diff (1.6 KB) - added by David Larlet 8 years ago.
Update the patch against r9814 + a couple of fixes
patch_django_7656.20090209.diff (1.2 KB) - added by David Larlet 8 years ago.
Patch against r9820, AdminTimeWidget inherit from TimeInput and not DateTimeInput

Download all attachments as: .zip

Change History (17)

comment:1 Changed 8 years ago by Jeff Anderson

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 8 years ago by Marc Garcia

Keywords: i18n-rf nfa-blocker added
milestone: 1.0 alpha

Not sure, but this should work in trunk, so marking it as nfa-blocker (loosing functionality). Modify it if I'm wrong.

Changed 8 years ago by Alex Gaynor

Attachment: admin_widgets.diff added

Updates admin widgets to subclass DateTimeInput

comment:3 Changed 8 years ago by Alex Gaynor

milestone: 1.0 alphapost-1.0

This requires #7509 so it probably won't go in for a while.

comment:4 Changed 8 years ago by Brian Rosner

Keywords: nfa-blocker removed

comment:5 Changed 8 years ago by Malcolm Tredinnick

What's the backwards incompatibility impact of this change? Ignore what it depends upon for now, since fixing a bunch of i18n date problems is quite possible before 1.0. If people's admin sites are going to become backwards incompatible because of this change, it's a pre-1.0 or never situation.

comment:6 Changed 8 years ago by Alex Gaynor

With the patch I created all current tests pass fine(one was failing for Brian and we haven't been able to establish why yet).

comment:7 Changed 8 years ago by Alex Gaynor

Version: newforms-adminSVN

Changed 8 years ago by David Larlet

Update the patch against r9814 + a couple of fixes

comment:8 Changed 8 years ago by David Larlet

Owner: changed from nobody to David Larlet
Status: newassigned

comment:9 Changed 8 years ago by David Larlet

Has patch: set
Needs documentation: set
Needs tests: set

Changed 8 years ago by David Larlet

Patch against r9820, AdminTimeWidget inherit from TimeInput and not DateTimeInput

comment:10 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:11 Changed 7 years ago by Jannis Leidel

Cc: Jannis Leidel added

comment:12 Changed 7 years ago by Jannis Leidel

Cc: Jannis Leidel removed
milestone: 1.2
Owner: changed from David Larlet to Jannis Leidel
Patch needs improvement: set
Status: assignednew
Triage Stage: Design decision neededAccepted

comment:13 Changed 7 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [12029]) Fixed #12444 - Date based widgets now correctly handle input values when using locale-aware formatting. Also fixes #7656.

comment:14 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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