Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#10288 closed (fixed)

DateTimeInput widget's _has_changed fails when using custom output format

Reported by: Koen Biermans <koen.biermans@…> Owned by: nobody
Component: Forms Version: dev
Severity: Keywords: widgets
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The DateTimeInput widget has the option to format the rendered value. When this value returns, the _has_changed function always considers the value changed. This can be solved by applying the same format to the initial value before comparison.

I am attaching a patch and test.

Attachments (1)

datetimeinput.diff (1.6 KB ) - added by Koen Biermans <koen.biermans@…> 16 years ago.
fix and test for has_changed on datetimeinput widget

Download all attachments as: .zip

Change History (5)

by Koen Biermans <koen.biermans@…>, 16 years ago

Attachment: datetimeinput.diff added

fix and test for has_changed on datetimeinput widget

comment:1 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 16 years ago

Resolution: fixed
Status: newclosed

(In [10641]) Fixed #10288 -- Corrected _has_changed handling of DateTimeInput, DateInput, TimeInput, and SplitDateTimeWidget when a custom date/time format is in use. Thanks to Koen Biermans for the report and patch.

comment:3 by Russell Keith-Magee, 15 years ago

(In [10757]) [1.0.X] Fixed #10288 -- Corrected _has_changed handling of DateTimeInput when a custom date/time format is in use. Thanks to Koen Biermans for the report and patch.

Merge of r10641 from trunk.

comment:4 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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