Opened 5 years ago

Closed 5 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:


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 5 years ago.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by magnus

comment:1 Changed 5 years ago by jezdez

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

(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