themesberg / themesberg/flowbite-react

bug: Datepicker always displays below input field

Open
#1,350 0 comments 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. Go to any datepicker example in the docs (i.e. title)
  2. Scroll so that the input field is at the bottom of the viewable content
  3. Open datepicker
  4. 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:

image

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.