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

Hover classes buggy #505

Closed
jorrit opened this issue Apr 9, 2021 · 2 comments
Closed

Hover classes buggy #505

jorrit opened this issue Apr 9, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@jorrit
Copy link

jorrit commented Apr 9, 2021

I noticed the following peculiarity regarding the --hover / --hoverEnd / --hoverStart classes:

When a date range is selected, let's say [2020-04-10, 2020-04-15] and a date range is clicked, such as 2020-04-01, a new range is started. This overrides the old range.

However, the hover classes suggest that either the start or the end date of the existing range are used as a start or end date of the new range.

I've made a codesandbox that visualizes which days get the hover/hoverStart/hoverEnd classes at https://codesandbox.io/s/react-calendar-hover-demo-np5n0.

As you can see, the hover classes have no relationship to the new value once there already is a value.

Also, the hover classes don't work correctly when hovering a date within the current date.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

@github-actions github-actions bot added the stale label Aug 26, 2021
@wojtekmaj wojtekmaj added bug Something isn't working and removed stale labels Aug 26, 2021
@wojtekmaj
Copy link
Owner

Technically, default styles only applied hover styling when --selectRange class was set on parent wrapper, but you're right, there was no reason for these classes to be updated until first selection has been made. Fixed.

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

2 participants