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

fix: Scroll fails past start or end date #156

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

snopan
Copy link

@snopan snopan commented Feb 24, 2022

Purpose

When the calendar has start or end date defined like so
image
If you go a date anywhere before 24th on the next month
image
The left button to go back a month will fail, the same will happen if it's selecting date or year. The reason is becasue when clicking the left button it will select a date a month ago and if that date is unselectable (behind start date or after end date) then it will just give up. This also breaks scrolling because it's the same action as clicking the arrows. A possible solution is to take the start date or end date instead of doing nothing.

Changes

  • Added getClosestDate which finds the closest valid date if the given date is outside of the start and end date range.
  • When add is called and if the date is unselectable, it will just get closest date

@snopan snopan changed the title bugfix/Scroll fails past start or end date fix: Scroll fails past start or end date Feb 24, 2022
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

Successfully merging this pull request may close these issues.

None yet

1 participant