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
|
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.
fix and test for has_changed on datetimeinput widget