react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

fix(months): monthClassName is passed the month instead of the current day

Open DanielSharp01 opened this issue 3 years ago • 1 comments

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: image

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.

DanielSharp01 avatar Jul 29 '22 12:07 DanielSharp01

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.

codecov[bot] avatar Aug 24 '22 07:08 codecov[bot]