themesberg / themesberg/flowbite-react
DatePicker Decade view is bugged
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
- Click to open the DatePicker
- Go to the Decades-View (highest)
- Select a random decade (ex. 1990)
Current behavior
After clicking on a decade, the DatePicker often (not everytime) shows the wrong decade (ex. you click on 1990 and it shows 2020).
This occurs only on the decades view.
See this screen capture for better understanding: https://github.com/user-attachments/assets/c0e66f04-193a-4e78-8ab9-1851979bc741
Expected behavior
The click on the decade should show the correct years.
Context
I've tested it on Chrome (131.0.6778.109) and Firefox (133.0). The DatePicker is used to select the users birthdate, so it happens often that the user will be in the decades view and see this behaviour.
It's also happening on the Flowbite-React documentation page (https://flowbite-react.com/docs/components/datepicker), so it's a general problem and not only in this context.
I suggest as a temporary workaround that we can add a property to the DatePicker to choose which view should be the highest (days, months, years, decades) or to remove the decades view entirely until it works properly.
Thanks and best regards
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 from the DatePicker shown on the Flowbite-React documentation page and reproduce the decade-selection steps in Chrome or Firefox. Trace the DatePicker decade-view entry point and verify that selecting a decade consistently displays its correct years; the work is done when the reported mismatch no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100