Time Input
Form-associated time-of-day input with a scroll-wheel picker, step and range constraints, helper text and error states.
c2-time-input wraps the browser’s native time control in a consistent, themeable field. Its value, min and max are 24-hour strings (HH:mm, or HH:mm:ss when step is below 60 seconds) whatever the display locale, while form submission, reset, required validation and keyboard editing stay native. The clock button (or Alt+ArrowDown in the field) opens the component’s own picker instead of the platform one: a large readout of the chosen time over scroll-snapping hour and minute columns, plus seconds when step is below 60 and AM/PM on 12-hour locales (the nearest lang decides, as it does for the field). The columns follow step, times outside min/max are dimmed, and every part of it is themed through the --c2-time-input__picker* variables. It shares its field styling with c2-date-input, so the two sit side by side.
Import
import '@c2n/components/time-input'Usage
Listen for input while the value changes and change when it is committed. step is in seconds (default 60): 900 accepts quarter hours only, and anything below 60 adds a seconds segment. min and max are inclusive; when min is later than max the valid range wraps past midnight (min="22:00" max="06:00" for a night shift). valueAsNumber exposes the time as milliseconds since midnight, and showPicker() / hidePicker() open and close the picker. Picking a value fires input and change together.