Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[calendar] calendar gets stuck in an infinite loop when disabledDateBuilder disables all future or past dates #545

Open
samrichardsontylertech opened this issue Apr 29, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@samrichardsontylertech
Copy link
Contributor

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:

  1. Create a Forge calendar instance with all dates after the current month disabled via disabledDateBuilder
  2. Click the next month button

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:

  • Forge version: 2.23.0
  • I have searched existing issues before creating this report? Y
  • Browser: All
  • Platform: All
  • OS: All

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 or max should still disabled navigation past the min or max date as it currently does.

@samrichardsontylertech samrichardsontylertech added the bug Something isn't working label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant