onesine / react-tailwindcss-datepicker

Modern date range picker component for React using Tailwind 3 and dayjs. Alternative to Litepie Datepicker.
https://react-tailwindcss-datepicker.vercel.app/
MIT License
552 stars 169 forks source link

id attribute not passed on to underlying input #223

Closed peershaped closed 11 months ago

peershaped commented 11 months ago

Thank you for this nice Datepicker component. It works pretty well and does the job for me. There is one slight issue:

<label for="myId">My Datepicker label</label>
<Datepicker
  id="myId" <-- this is not passed on to the underlying input field
/>

This results in: image

It is a minor issue. I noticed it while I was cleaning up my warnings :)

Edit: Closed this issue. I did not look for the alternatives. I should use inputId instead of id

<Datepicker
  inputId="myId" <-- this is passed on to the underlying input field
/>