Closed fendiaoxiaoshuazi closed 2 years ago
The issue was found in the Survey123 JS API. When the time question has the default value, and they want to change the value through the JS function, the value cannot be set correctly.
Thanks for reporting this and reproducing the issue! I am the original author of this component and have verified this locally. It appears to be caused by the internal calciteTimePickerChange
event listener sending an incorrect time value back up to the input component. I can fix this by making the internal time-picker component respect direct value setting so that it doesn't interfere with direct value setting in the input component.
Installed and assigned for verification.
Verified on next
Actual Behavior
When the default value exists on the calcite-input-time-picker, the set value on the input time picker will work incorrectly.
For example, the input time picker has the default value of 11:00, when I try to set the input time picker's value to 14:30 by code, the input time picker will receive an incorrect value 14:00:00. (Note: if the input time picker does not have the default value, set value can work correctly.)
Expected Behavior
The value should be set correctly on the input time picker when the default value exists.
Reproduction Sample
https://codepen.io/nan9266/pen/XWzzaxM?editors=1111
Reproduction Steps
Reproduction Version
1.0.0-beta.72
Relevant Info
No response
Regression?
No response