Code

Opened 4 years ago

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

Description

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

Download all attachments as: .zip

Change History (2)

Changed 4 years ago by magnus

comment:1 Changed 4 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.