When the calendar has start or end date defined like so
If you go a date anywhere before 24th on the next month
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
Purpose
When the calendar has start or end date defined like so If you go a date anywhere before 24th on the next month 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