Opened 8 years ago

Closed 7 years ago

Last modified 5 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: master
Severity: Keywords: widgets
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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@…> 8 years ago.
fix and test for has_changed on datetimeinput widget

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Koen Biermans <koen.biermans@…>

Attachment: datetimeinput.diff added

fix and test for has_changed on datetimeinput widget

comment:1 Changed 8 years ago by Jacob

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

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

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 Changed 7 years ago by Russell Keith-Magee

(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 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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