I want to be able to close when clicking the X close button
but not to close when clicking anywhere
I tried implementing that if onFocusChange , focusinput is null, I will keep it open by focusing on start date
but the button close also produced null
my code:
<DateRangeInput
onDatesChange={(data) => {
setState(data);
}}
onFocusChange={(focusedInput) => {
console.log(focusedInput);
if (focusedInput === null) {
setState((prev) => ({ ...prev, focusedInput: START_DATE }));
} else {
setState((prev) => ({ ...prev, focusedInput }))
}
}
}
startDate={props.startDate}
endDate={props.endDate}
focusedInput={state.focusedInput}
displayFormat="dd/MM/yyyy"
/>