You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When loading a time picker input that already has a value on it, the form will immediately be marked as dirty.
To Reproduce
Steps to reproduce the behavior:
Create a time picker input and give it a default value that isnt blank.
After loading the form view the dirty state and it should be set to dirty
Expected behavior
When loading a form with a time-picker that has a default value the form should not be marked as dirty until a change is made on the form.
Actual behavior
When loading a form with a time-picker that has a default value the form is marked as dirty before a change was made on the form.
Additional context
I believe the issue is in the method dispatchOnChange in the TimePickerInput.ts file. Here we are comparing the set value to the newValue and if they are not the same then we fire off an event to change/write the value. This is getting set off when the form loads which is fine but the problem lies when comparing the 2 values as they appear to never be equal no matter what. I think here we should be comparing minutes and hours values instead of the whole date value since I think the millisecond on the date variables is causing the comparison check to always fail even if the hours and minutes are matching.
The text was updated successfully, but these errors were encountered:
Describe the bug
When loading a time picker input that already has a value on it, the form will immediately be marked as dirty.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When loading a form with a time-picker that has a default value the form should not be marked as dirty until a change is made on the form.
Actual behavior
When loading a form with a time-picker that has a default value the form is marked as dirty before a change was made on the form.
Additional context
I believe the issue is in the method dispatchOnChange in the TimePickerInput.ts file. Here we are comparing the set value to the newValue and if they are not the same then we fire off an event to change/write the value. This is getting set off when the form loads which is fine but the problem lies when comparing the 2 values as they appear to never be equal no matter what. I think here we should be comparing minutes and hours values instead of the whole date value since I think the millisecond on the date variables is causing the comparison check to always fail even if the hours and minutes are matching.
The text was updated successfully, but these errors were encountered: