themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.78k stars 396 forks source link

bug: date immediately prior to `minDate` in Datepicker still selectable / maxDate not selectable #1272

Open tylernisonoff opened 5 months ago

tylernisonoff commented 5 months ago

Steps to reproduce

  1. Go to datepicker "Limit the date" example on website
  2. Example tries to limit minDate to 2023-01-01

Current behavior

If you scroll back to 2022-12-31, its still available. There seems to be an "off-by-one" where the previous date of the minDate is still available for selection.

Similarly, the maxDate is not available, even though this is meant to be inclusive

Expected behavior

2022-12-31 to be disabled.

SutuSebastian commented 4 months ago

CC @rluders

rluders commented 4 months ago

Not sure if I get it... but some screenshots:

image image

It seems correct to me. It is limited between January 1st and April 30th of 2023. What am I missing here? @tylernisonoff