Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
7.92k stars 2.23k forks source link

dayClassName runs even on hover and loops on every date making the datepicker rendering slower. #4744

Open jackvik opened 2 months ago

jackvik commented 2 months ago

Describe the bug I want to select the dates on first render and i want to customise the css for that, so using dayClassName but due to this dayClassName method, now, even on hovering over date running this method which ultimately slows down the rendering due to multiple iterations. To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.