Skip to content

feat(solid-kit): float the date and time field's steppers - #61

Merged
b0czek merged 2 commits into
mainfrom
feat/solid-kit-datetime-popover
Nov 26, 2026
Merged

b0czek merged 2 commits into
mainfrom
feat/solid-kit-datetime-popover

Conversation

@b0czek

@b0czek b0czek commented Nov 26, 2026

Copy link
Copy Markdown
Owner

DateTimeField now opens its steppers in a floating panel. Before, the panel opened inline and pushed everything below the field down, which no other picker does.

From open To open
From stepper floating over the Logs time panel To stepper floating under its field

The screenshots show the field inside Ctrl Diagnostics' Logs time filter, which is itself a popover.

  • Placement:
    • The panel is rendered in a portal, so a surrounding container's overflow can't clip it.
    • It sits under the field and is at least 300 px wide.
    • It flips above the field when there's no room below, and stays on screen horizontally.
  • Closing: Done, a tap outside, Escape, scrolling outside the panel, or a window resize.
  • Nested in another popover:
    • Escape is handled in the capture phase and stopped, so it closes only this panel.
    • Pointer events inside the panel stop at it, so a surrounding popover doesn't treat a stepper tap as a tap outside.
    • The steppers' own pointerdown listeners are native, not Solid's delegated ones, so hold-to-repeat still runs before the event is stopped.
  • Look: the panel has a solid background, border and shadow, like other floating panels.

New test: a stepper tap and Escape don't reach document listeners. Escape and a tap outside close the panel. Without the containment, a surrounding popover such as the Logs time filter would close too.

Not checked: a real touch panel.

The steppers open in a panel over the page, under the field or above it
when there is no room, instead of pushing the content below down. A tap
outside, Escape, scrolling or resizing closes it, and taps and Escape stop
at the panel so a surrounding popover stays open.
@b0czek
b0czek merged commit c92c8a3 into main Nov 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant