themesberg / themesberg/flowbite-react

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

Open
#1,272 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs info
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

  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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.