Opened 6 years ago

Closed 6 years ago

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

Download all attachments as: .zip

Change History (5)

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

fix and test for has_changed on datetimeinput widget

comment:1 Changed 6 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(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 6 years ago by russellm

(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 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

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