semantic-ui-calendar-react
semantic-ui-calendar-react copied to clipboard
TimeInput issue with clearable
Describe the bug The time list can't be returned to its original list when clicked clear X button.
To Reproduce Steps to reproduce the behavior:
- Click on TimeInput then choose a time. ex: 04:00
- Then click on clear X button
- Click on TimeInput, then you can see the list time of 04:00 , 04:05, 04:10, ... => It's wrong!
So when click clear X button, the time list need to be original list.
If you're setting the value
of the calendar, you'll need to set the value
back to the original time that you want.
You can also use the onClear
prop to trigger a function when the clear function is clicked:
<DateInput
value={this.state.dateValue}
clearable
onClear={() => this.setState({ dateValue: '01-01-2020' })}
/>
^ Something like that should answer your question. @ocvninfo - Does that help?
I have the same issue and this is not as simple as you think it is @DovahBrownies. I for the life of me cannot get it to reset correctly in the time input.
https://github.com/arfedulov/semantic-ui-calendar-react/issues/221
https://www.loom.com/share/2592e58efab54c9fb00f848b6afdcb8b