Opened 4 years ago

Closed 4 months ago

#17401 closed Bug (fixed)

SelectDateWidget doesn't display erroneous values

Reported by: anonymous Owned by: Claude Paroz <claude@…>
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 4 years ago.

Download all attachments as: .zip

Change History (9)

Changed 4 years ago by anonymous

comment:1 Changed 4 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 2 years ago by marw85

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

comment:4 Changed 2 years 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 2 years ago by viciu

  • Cc wiktor@… added

comment:6 Changed 11 months ago by timo

  • Patch needs improvement set

I left comments for improvement on the PR. Please uncheck "Patch needs improvement" when you update it, thanks.

comment:7 Changed 4 months ago by claudep

  • Patch needs improvement unset

comment:8 Changed 4 months ago by Claude Paroz <claude@…>

  • Owner set to Claude Paroz <claude@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 4b8979e477a5315f3dfde0348393fd404fb70ee4:

Fixed #17401 -- Made SelectDateWidget.render reflect wrong value

Thanks Marcin Wrobel for the initial patch.

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