react-datepicker
react-datepicker copied to clipboard
fix(months): monthClassName is passed the month instead of the current day
This PR aims to fix a bug with monthClassName in the month picker. The bug was that the current date with the selected year is passed for all months making the feature not be able to target specific months only all of them in a given year.
The use case is something like this:

This might need some tests, however I don't exactly know where to add them. Given a bit of guidance I'm happy to contribute those as well.
Codecov Report
Merging #3709 (aa2394b) into master (60d95bb) will not change coverage. The diff coverage is
50.00%.
@@ Coverage Diff @@
## master #3709 +/- ##
=======================================
Coverage 94.08% 94.08%
=======================================
Files 20 20
Lines 1723 1723
Branches 417 417
=======================================
Hits 1621 1621
Misses 31 31
Partials 71 71
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/month.jsx | 92.64% <50.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.