Opened 7 years ago

Closed 3 years ago

#13205 closed Bug (wontfix)

Fix empty value detection in DateTimeField with SplitDateTimeWidget rendering

Reported by: Bastian Kleineidam <calvin@…> Owned by: nobody
Component: Forms Version: 1.1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Hi,

when using a SplitDateTimeWidget for rendering, the empty value is [None, None].
I think this should be detected as an empty value.
Attached is a patch against the current Django 1.1 branch with test.

Regards, Bastian

Attachments (1)

django-empty-datetimefield.patch (2.0 KB) - added by Bastian Kleineidam <calvin@…> 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by Bastian Kleineidam <calvin@…>

comment:1 Changed 7 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Karen Tracey

Is this different from #8898?

comment:3 Changed 5 years ago by Luke Plant

Type: Bug

comment:4 Changed 5 years ago by Luke Plant

Severity: Normal

comment:5 Changed 5 years ago by patchhammer

Easy pickings: unset
Patch needs improvement: set

django-empty-datetimefield.patch fails to apply cleanly on to trunk

comment:6 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 Changed 3 years ago by Claude Paroz

Resolution: wontfix
Status: newclosed

As stated in #8898, SplitDateTimeWidget should be used with SplitDateTimeField. The support for SplitDateTimeWidget in DateTimeField will be deprecated.

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