Opened 13 years ago

Closed 10 years ago

#17401 closed Bug (fixed)

SelectDateWidget doesn't display erroneous values

Reported by: anonymous Owned by: Claude Paroz <claude@…>
Component: Forms Version: dev
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 13 years ago.

Download all attachments as: .zip

Change History (9)

by anonymous, 13 years ago

Attachment: widgets.py.patch added

comment:1 by Gabriel Hurley, 13 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Julien Phalip, 13 years ago

Needs tests: set

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

comment:3 by marw85, 12 years ago

Owner: changed from nobody to marw85
Status: newassigned

comment:4 by marw85, 12 years ago

Needs tests: unset
Owner: marw85 removed
Status: assignednew

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

comment:5 by Wiktor, 12 years ago

Cc: wiktor@… added

comment:6 by Tim Graham, 10 years ago

Patch needs improvement: set

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

comment:7 by Claude Paroz, 10 years ago

Patch needs improvement: unset

comment:8 by Claude Paroz <claude@…>, 10 years ago

Owner: set to Claude Paroz <claude@…>
Resolution: fixed
Status: newclosed

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