Wizard: fix datepicker reset glitch (MS-8610)
If the reset button is clicked, there is a glitch that shows error state for a moment. This commit removes the glitch by setting the snapshot date even for invalid values, and removes the workaround that was previously added.
This commit is contained in:
parent
a93a163afb
commit
6ec6f33fda
3 changed files with 10 additions and 7 deletions
|
|
@ -138,10 +138,7 @@ export default function Snapshot() {
|
|||
onClick={async () => {
|
||||
//Patternfly DatePicker seems to only clear error text if value is reset to '',
|
||||
// if you have an invalid date (2000-01-010000) and try to reset it, it must be set to '' first
|
||||
dispatch(changeSnapshotDate(''));
|
||||
setTimeout(() => {
|
||||
dispatch(changeSnapshotDate(yyyyMMddFormat(new Date())));
|
||||
}, 1);
|
||||
dispatch(changeSnapshotDate(yyyyMMddFormat(new Date())));
|
||||
}}
|
||||
>
|
||||
Reset
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue