I have below code
const [focusedInput, setFocusedInput] = useState('startDate');
const onFocusChange = fInput => {
setFocusedInput(!fInput ? 'startDate' : fInput);
};
<DayPickerRangeController
key={dateRange.startDate}
startDate={dateRange.startDate}
endDate={dateRange.endDate}
onDatesChange={onDatesChange}
onFocusChange={onFocusChange}
focusedInput={focusedInput}
numberOfMonths={2}
isOutsideRange={day => moment().diff(day) < 0}
initialVisibleMonth={() => dateRange.startDate}
/>
initialVisibleMonth causing the issue
Cannot read property 'clone' of null at new DayPicker
I tried googling alot but didn't find any solution. What I am trying move the calendar to first month.. like I am on dec 2020 and someone select this year, it should show the the calendar to jan 2020, This year selection is fine, I am seeing the whole year is selected in calendar just the month is not shifting to jan so that it can be visible
Any idea
Thanks