Open bertho-zero opened 3 years ago
I'm having this issue as well
me too
a workaround for now:
const [focusedRange, setFocusedRange] = useState([0,0])
const onRangeFocusChange = (item) => {
setFocusedRange(item)
}
<DatePicker
focusedRange={focusedRange}
onRangeFocusChange={onRangeFocusChange}
/>
https://github.com/hypeserver/react-date-range/blob/33f2294eabc13f2413895faf9125e0cf0385dcad/src/components/DateRangePicker/index.js#L18
https://github.com/hypeserver/react-date-range/blob/33f2294eabc13f2413895faf9125e0cf0385dcad/src/components/DateRangePicker/index.js#L33
As soon as we define the onRangeFocusChange prop, it overwrites the internal function and the state is no longer updated