don't trigger date picker onchange until 2 dates are picked
This commit is contained in:
parent
c41ad5d469
commit
0134968fc1
@ -905,12 +905,13 @@ export function DatePicker ({ fromName, toName, noForm, onChange, when, from, to
|
||||
}, [])
|
||||
|
||||
const innerOnChange = ([from, to], e) => {
|
||||
setRange(whenRange(when, from, to))
|
||||
setRange([from, to])
|
||||
if (!noForm) {
|
||||
fromHelpers.setValue(from)
|
||||
toHelpers.setValue(to)
|
||||
}
|
||||
onChange(formik, [from, to], e)
|
||||
if (!from || !to) return
|
||||
onChange?.(formik, [from, to], e)
|
||||
}
|
||||
|
||||
const onChangeRawHandler = (e) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user