Opened 14 years ago

Closed 14 years ago

#13592 closed (fixed)

SelectDateWidget should use datetime_safe

Reported by: magnus Owned by: nobody
Component: Forms Version:
Severity: Keywords: SelectDateWidget datetime_safe strftime
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX: no


Currently, SelectDateWidget.value_from_datadict throws a ValueError courtesy of strftime when L10N is enabled and a year before 1900 is entered. The date should be converted to datetime_safe before strftime is called.

Attachments (1)

selectdatewidget.patch (1.3 KB ) - added by magnus 14 years ago.

Download all attachments as: .zip

Change History (2)

by magnus, 14 years ago

Attachment: selectdatewidget.patch added

comment:1 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [13301]) Fixed #13592 -- Make sure the SelectDateWidget works with dates before 1900 when localization is enabled. Thanks for the report and patch, magnus.

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