[calendar] calendar gets stuck in an infinite loop when disabledDateBuilder
disables all future or past dates
#545
Labels
bug
Something isn't working
Describe the bug:
When the calendar's next or previous month button is clicked and all dates in the relevant direction are disabled via the
disabledDateBuilder
callback, the calendar will not render the requested month. Instead it endlessly goes through months, running the callback on each date and freezing the page.To Reproduce:
Steps to reproduce the behavior:
disabledDateBuilder
Expected behavior:
The calendar should render a new month even if no dates within the month are enabled. Navigation between disabled date may need to be allowed.
Please complete the following information:
Additional context:
The ideal solution as discussed is to enable focus and navigation on disabled dates. Attempting to go to the next or previous month should always result in the next or previous month rendering instead of the month with the closest enabled date. Setting
min
ormax
should still disabled navigation past the min or max date as it currently does.The text was updated successfully, but these errors were encountered: