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

crash when minDate is later in the year than maxDate #17

Open
sproctor opened this issue Jan 4, 2023 · 1 comment
Open

crash when minDate is later in the year than maxDate #17

sproctor opened this issue Jan 4, 2023 · 1 comment

Comments

@sproctor
Copy link

sproctor commented Jan 4, 2023

If minDate is 2000-05-20 and maxDate is 2023-01-04, the DateRangeIterator will never find a date in 2023, and setting up the year grid state will throw an exception. A simple fix is to use Jan 1 for the start and end days of the dateRangeByYear. We actually want a YearRange there, not a DateRange.

@sproctor
Copy link
Author

sproctor commented Jan 4, 2023

You can see eca411c with the change from a DateRange to IntRange.

It's possible that stepping by month could have a similar bug if the day of month of the minDate is later than the day of month of the maxDate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant