feat(ADatePicker): style date range on hover when choosing an end date #1214
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Closes #1167 and adds styling for date picker range variants.
What is the current behavior?
Overlapping days in ranges spanning multiple months are not being highlighted, making it unclear which date range has been selected. Example:
Start date: May 18, 2022
End date: June 8, 2022
After clicking June 8, the month of June properly highlights June 1st through June 8th, but does not indicate that May 29 through May 31 (the previous month where the starting date exists) are also part of the newly created range.
Additionally, after selecting the starting date, there is no styling to suggest what range would be created when hovering over a potential end date candidate. This can be confusing to a user who is not sure how the date range is actually being created based off their selections.
What is the new behavior (if this is a feature change)?
Highlights all days of a date range, regardless of if the days are in previous/future months in the currently displayed month/year UI, as well as the hypothetical range that would be created when hovering an end date:
Does this PR introduce a breaking change?
No
Other information:
Another alternative to this is to remove the days in the calendar that do not correspond with the following month being shown in the calendar UI. In the examples above, it would mean the slots for May 29 - May 31 would be empty.