Bug
If I pass a dateHeader component to the calendar, the month view throws the following error when navigating (using the back/next buttons):
Cannot read property '0' of undefined
For some reason (haven't had time to investigate yet) the length of weeks is 0.
This can be seen in the "custom date header" example in storybook.
@jquense I was also experiencing this issue and noticed that in the handleNavigate handler, the date calculated by moveDate is invalid. To fix this issue, I set defaultDate to the current date and everything works seems to work as expected.
Do you have any thoughts as to why this might be the case? I quickly debugged the issue and can try spending some time this weekend trying to further understand what's going on.
I am having the same issue. How would I go about setting defaultDate to the current date?
formats={formats}
defaultDate={new Date()}
/>
@berryman17 defaultDate={new Date()}
Thank you!
I am also experiencing this issue in v0.19.0 and the defaultDate={new Date()} also seemed to work for me. I am not setting at a dateHeader either.
@maintainers how about updating the docs for this?
Most helpful comment
@berryman17
defaultDate={new Date()}