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 class not applied on day component for datepicker with selectsRange prop #3595

Conversation

c-falardeau
Copy link
Contributor

  • Apply the react-datepicker__day--selecting-range-end class on the day component while user is selecting the end date for the range
  • Added unit test

I observed that for datepicker having the selectsRange prop, when the user is selecting a range only the react-datepicker__day--selecting-range-start is set on the day component starting the range. While the user is moving the mouse on other day components, the class react-datepicker__day--selecting-range-end would not be applied on the hovered day to indicate that he is selecting that day as the end date.

I would need this class to be applied to perform custom styling for achieving this kind of styling:

chrome_z0vE4vZ9OU

This would help me to not continue the blue line after the end date.

- Apply the 'react-datepicker__day--selecting-range-end' class on the day component while user is selecting the end date for the range
- Added unit test
@c-falardeau c-falardeau changed the title Fix class not applied for date picker with selectsRange prop Fix class not applied on day component for datepicker with selectsRange prop May 15, 2022
@martijnrusschen
Copy link
Member

Merging in the latest master branch should fix the CI checks on the Pull request.

@c-falardeau
Copy link
Contributor Author

Good catch thanks :)

@codecov
Copy link

codecov bot commented May 17, 2022

Codecov Report

Merging #3595 (5b0b380) into master (8563862) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 5b0b380 differs from pull request most recent head 0f5d4fa. Consider uploading reports for the commit 0f5d4fa to get more accurate results

@@           Coverage Diff           @@
##           master    #3595   +/-   ##
=======================================
  Coverage   93.32%   93.32%           
=======================================
  Files          20       20           
  Lines        1349     1349           
  Branches      375      375           
=======================================
  Hits         1259     1259           
  Misses         27       27           
  Partials       63       63           
Impacted Files Coverage Δ
src/day.jsx 93.06% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8563862...0f5d4fa. Read the comment docs.

@martijnrusschen martijnrusschen merged commit 0174e69 into Hacker0x01:master May 17, 2022
@c-falardeau c-falardeau deleted the fix-missing-class-while-selecting-end-for-selectsRange-datepicker branch May 18, 2022 15:34
@c-falardeau
Copy link
Contributor Author

Hello, do you know when the new release will be available containing this PR please?

Best regards,
Christian

@martijnrusschen
Copy link
Member

I'll try to get it released in the next few days

@c-falardeau
Copy link
Contributor Author

Thanks :)

@c-falardeau
Copy link
Contributor Author

Hello @martijnrusschen, I was wondering if it is possible to get a new release including this fix please :)

@cnorthfield
Copy link

@martijnrusschen any chance of a release of this, please?

@jgregory-apogee
Copy link

For now I'm working around this with .react-datepicker__day--in-selecting-range:hover.

p-rogas pushed a commit to p-rogas/react-datepicker that referenced this pull request Mar 22, 2023
…-while-selecting-end-for-selectsRange-datepicker
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

4 participants