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

[BUG] mouse hover effect on range picker #21

Closed
metalmaninfr opened this issue Jun 23, 2021 · 16 comments
Closed

[BUG] mouse hover effect on range picker #21

metalmaninfr opened this issue Jun 23, 2021 · 16 comments
Labels
bug Something isn't working

Comments

@metalmaninfr
Copy link

Expected Behavior

on range date picker, on 1st onClick on date, the mouse hover effect should stay on the day we clicked before mouseLeave

Current Behavior

When I click on a day, a selection of days has a mouse hover effect

Possible Solution

no idea

Your Environment

Mac os 11.4 - Chrome
React 17.1
next 10.3

Additional Comments

https://gyazo.com/fc2916dd34f3dcd120ae1c9874764515

@samsam-ahmadi samsam-ahmadi added the bug Something isn't working label Jun 23, 2021
@coling
Copy link
Contributor

coling commented Jun 24, 2021

I've seen this too. I'll try and take a look sometime soon if @samsam-ahmadi doesn't beat me to it

coling added a commit to coling/react-trip-date that referenced this issue Jun 24, 2021
When we've not yet selected a hoverDay and there is no 'to' date selected, the date
we used for comparisons was just an empty string.

If this is the case we should use our 'from' date.

Fixes samsam-ahmadi#21
@coling
Copy link
Contributor

coling commented Jun 24, 2021

Just FYI, I fixed this in a commit I've just included in an open pull request #22
I can split this out (as it's arguably unrelated) but otherwise it should get into a release soon enough 😃

@samsam-ahmadi
Copy link
Owner

@coling @metalmaninfr, Thank you so much, Sorry I have feeling bad. I will check them ASAP.

@coling
Copy link
Contributor

coling commented Jun 25, 2021

@coling @metalmaninfr, Thank you so much, Sorry I have feeling bad. I will check them ASAP.

There is no rush on my part. Rest up and feel better :-)

@z-Amiryan
Copy link

I have same problem with the RangePicker component when I try to setState dates(from, to), mouse hover effect disappears.

@coling
Copy link
Contributor

coling commented Jun 27, 2021

I think this is fixed now @samsam-ahmadi as I did fix up the class application in the recent pull request you just merged. You may want to tidy it up and make it clearer/better tho' 😄

@samsam-ahmadi
Copy link
Owner

samsam-ahmadi commented Jun 27, 2021

Thanks @coling. ​
I just merged it to test it here; I just understand we have a problem with the custom title of weeks. If you change the startOfWeek here, you can see the titles have a problem.

https://killthejs.com/react-trip-date/?path=/story/range-picker-component--custom-components-header-titles

@samsam-ahmadi
Copy link
Owner

I fixed it with this commit

And new release is available: @1.7.0

@coling
Copy link
Contributor

coling commented Jun 27, 2021

Thanks @coling. ​
I just merged it to test it here; I just understand we have a problem with the custom title of weeks. If you change the startOfWeek here, you can see the titles have a problem.

https://killthejs.com/react-trip-date/?path=/story/range-picker-component--custom-components-header-titles

🤦🏼 I mustn't have tested that properly.... Sorry 😢 and thanks for the fix 😄

@metalmaninfr
Copy link
Author

I'm still having the same problems, as I am resetting the "start-date" and the "end_date" to null, i think the getEndDateForClasses is not triggering, i think it should be called on onClick

https://gyazo.com/affe1abcf9dc0dfc020d0fb0abcfaf80

@samsam-ahmadi
Copy link
Owner

@metalmaninfr Would you please reproduce it in the codesandbox ?

@samsam-ahmadi samsam-ahmadi reopened this Jul 1, 2021
@metalmaninfr
Copy link
Author

@samsam-ahmadi
Copy link
Owner

@metalmaninfr Please check this version [email protected]

@metalmaninfr
Copy link
Author

seems to work, thank you :)

@samsam-ahmadi
Copy link
Owner

@metalmaninfr Great. I closed this issue, if you have any other issue or ideas feel free to open issue or PR.

@z-Amiryan
Copy link

thank you for fixing this bug))

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

4 participants