themesberg / themesberg/flowbite-react

DatePicker Decade view is bugged

Open
#1,516 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Click to open the DatePicker
  2. Go to the Decades-View (highest)
  3. 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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.