themesberg / themesberg/flowbite-react
bug: date immediately prior to `minDate` in Datepicker still selectable / maxDate not selectable
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 506
- PR merge metrics
- No merged PRs in 30d
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Steps to reproduce
- Go to datepicker "Limit the date" example on website
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the boundary behavior in the Datepicker's "Limit the date" example linked in the issue, checking both the day immediately before minDate and maxDate itself. Trace the Datepicker implementation and its existing tests, if present, to identify the inclusive-boundary handling. Done means dates before minDate are disabled while minDate and maxDate remain selectable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, tailwindcss, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100