Skip to content
Hazine

Time and duration inputs

0 of 5 shipped. Nothing has shipped here yet. The list below is what this family will hold, and how each structure differs.

Planned 5

  • Segmented time field

    Spinbutton segments with typed entry: two digits auto-advance, ArrowUp and ArrowDown step by a configurable minute step with wrap, and typing 'a' or 'p' sets the day period. The 12 or 24 hour format follows the locale or a prop, and min and max times produce an inline error rather than silently clamping.

  • Time list combobox

    List plus free text: the list scrolls to the nearest time to now on open, typing filters and also normalises loose input into a valid time on Enter, and off-interval times are allowed. A separator in the list marks the current time and options before a min time are aria-disabled.

  • Start and end time range

    The two fields are linked: changing the start shifts the end to keep the duration, the end list begins after the start and labels every option with its duration, and an end past midnight is shown with a 'next day' tag instead of an error. Includes an optional 'All day' checkbox that collapses both fields.

  • Duration input with units

    Measures a length of time, not a clock time: values are not capped at 23 or 59 while typing and overflow is normalised on blur (90 min becomes 1 h 30 min). Visible units are configurable, quick chips (15 min, 30 min, 1 h, 2 h) set common values, and the component emits total seconds plus an ISO 8601 duration string.

  • Timezone select with offset

    Each option is a three part row (city, offset such as UTC+01:00, live local time) and search matches city, country, abbreviation and offset. The detected browser zone is pinned at the top with a 'Your time zone' tag, and offsets are computed with Intl for a given reference date so daylight saving shifts are correct for future events.