themesberg / themesberg/flowbite-react
bug: Datepicker always displays below input field
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 any datepicker example in the docs (i.e. title)
- Scroll so that the input field is at the bottom of the viewable content
- Open datepicker
- Datepicker displays below the field and requires scrolling to view
Current behavior
Unlike the tooltip or popover components, Datepicker does not have a sense of it's location on the page and will always show the datepicker below the input field
Expected behavior
Datepicker should behave like the tooltip and popover components where it will display above the field if there isn't enough space under it to fully display.
Context
Looking to improve a confusing user experience when opening the datepicker at the bottom of a page or container. It may not be obvious to the user that they are required to scroll to select a date. See screenshot below, where the datepicker is past the browser's viewport:
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 with the Datepicker example linked in the issue and compare its behavior with the tooltip and popover components. Trace how those components choose their placement, then verify that the datepicker opens above the input when there is insufficient space below and remains usable in the documented example.
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