Code

Opened 3 years ago

Last modified 17 months ago

#17401 new Bug

SelectDateWidget doesn't display erroneous values

Reported by: anonymous Owned by:
Component: Forms Version: master
Severity: Normal Keywords:
Cc: wiktor@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If you enter an invalid date (ie. Feb. 30) the bound widget will render empty.

I don't know if it is intentional but since it is inconsistent with most other widgets I consider it a bug.

Attachments (1)

widgets.py.patch (743 bytes) - added by anonymous 3 years ago.

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by anonymous

comment:1 Changed 3 years ago by gabrielhurley

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by julien

  • Needs tests set

Note that the same pattern is also used in SelectDateWidget.value_from_datadict(). This would need tests.

comment:3 Changed 17 months ago by marw85

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

comment:4 Changed 17 months ago by marw85

  • Needs tests unset
  • Owner marw85 deleted
  • Status changed from assigned to new

Added test, patch and tests integrated into:
https://github.com/django/django/pull/788

comment:5 Changed 17 months ago by viciu

  • Cc wiktor@… added

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from (none) to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.