Opened 7 years ago

Closed 6 years ago

Last modified 4 years ago

#7656 closed (fixed)

Change superclass of AdminDateWidget from TextInput to DateTimeInput

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

Download all attachments as: .zip

Change History (17)

comment:1 Changed 7 years ago by programmerq

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 7 years ago by garcia_marc

  • Keywords i18n-rf nfa-blocker added
  • milestone set to 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 7 years ago by Alex

Updates admin widgets to subclass DateTimeInput

comment:3 Changed 7 years ago by Alex

  • milestone changed from 1.0 alpha to post-1.0

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

comment:4 Changed 7 years ago by brosner

  • Keywords nfa-blocker removed

comment:5 Changed 7 years ago by mtredinnick

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

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

  • Version changed from newforms-admin to SVN

Changed 7 years ago by david

Update the patch against r9814 + a couple of fixes

comment:8 Changed 7 years ago by david

  • Owner changed from nobody to david
  • Status changed from new to assigned

comment:9 Changed 7 years ago by david

  • Has patch set
  • Needs documentation set
  • Needs tests set

Changed 7 years ago by david

Patch against r9820, AdminTimeWidget inherit from TimeInput and not DateTimeInput

comment:10 Changed 7 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:11 Changed 6 years ago by jezdez

  • Cc jezdez added

comment:12 Changed 6 years ago by jezdez

  • Cc jezdez removed
  • milestone set to 1.2
  • Owner changed from david to jezdez
  • Patch needs improvement set
  • Status changed from assigned to new
  • Triage Stage changed from Design decision needed to Accepted

comment:13 Changed 6 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:14 Changed 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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