Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React

Home Page:https://reactdatepicker.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jackvik opened this issue · comments

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

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.