Opened 16 years ago

Closed 14 years ago

Last modified 13 years ago

#7656 closed (fixed)

Change superclass of AdminDateWidget from TextInput to DateTimeInput

Reported by: jamesbeard Owned by: Jannis Leidel
Component: contrib.admin Version: dev
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: no UI/UX: no

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 16 years ago.
Updates admin widgets to subclass DateTimeInput
patch_django_7656.20090207.diff (1.6 KB ) - added by David Larlet 15 years ago.
Update the patch against r9814 + a couple of fixes
patch_django_7656.20090209.diff (1.2 KB ) - added by David Larlet 15 years ago.
Patch against r9820, AdminTimeWidget inherit from TimeInput and not DateTimeInput

Download all attachments as: .zip

Change History (17)

comment:1 by Jeff Anderson, 16 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Marc Garcia, 16 years ago

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.

by Alex Gaynor, 16 years ago

Attachment: admin_widgets.diff added

Updates admin widgets to subclass DateTimeInput

comment:3 by Alex Gaynor, 16 years ago

milestone: 1.0 alphapost-1.0

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

comment:4 by Brian Rosner, 16 years ago

Keywords: nfa-blocker removed

comment:5 by Malcolm Tredinnick, 16 years ago

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 by Alex Gaynor, 16 years ago

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 by Alex Gaynor, 16 years ago

Version: newforms-adminSVN

by David Larlet, 15 years ago

Update the patch against r9814 + a couple of fixes

comment:8 by David Larlet, 15 years ago

Owner: changed from nobody to David Larlet
Status: newassigned

comment:9 by David Larlet, 15 years ago

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

by David Larlet, 15 years ago

Patch against r9820, AdminTimeWidget inherit from TimeInput and not DateTimeInput

comment:10 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:11 by Jannis Leidel, 14 years ago

Cc: Jannis Leidel added

comment:12 by Jannis Leidel, 14 years ago

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 by Jannis Leidel, 14 years ago

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 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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