TimeField
A locale-ordered segmented wall-clock editor with a timezone-free ISO projection.@gemologic/sheen-date · date and timePlayground
Cutoff time
430PM
<TimeField label="Cutoff time" name="cutoff" defaultValue={createTime(16, 30)} granularity="minute"/>Variant matrix
Cutoff time
Cutoff time
430PM
hourCycle: 12
Cutoff time
430PM
hourCycle: 24
Cutoff time
1630
granularity: minute
Cutoff time
430PM
granularity: second
Cutoff time
43000PM
Anatomy
- Package
@gemologic/sheen-date- Source
packages/date/src/TimeField.tsx- Tokens
--sheen-color-border-control--sheen-color-bg-inset--sheen-color-focus-ring
Accessibility
Role: group of spinbuttonsKeyboard: ArrowLeft, ArrowRight, ArrowUp, ArrowDown, PageUp, PageDown, Home, End, numeric keysDo
- Keep a wall-clock Time separate from the zone that gives it an instant.
Do not
- Do not anchor a standalone Time to the browser's current date.
Generated props
| Name | Type | Default | Description |
|---|---|---|---|
label * | string | — | Required visible field label. |
value | Time | null | — | App-owned Sheen Time, or null. |
defaultValue | Time | null | — | Initial uncontrolled wall time. |
onValueChange | (value: Time | null) => void | — | Receives complete valid wall times and clearing. |
placeholderValue | Time | — | Deterministic values shown behind empty segments. |
minValue | Time | — | Minimum wall time. |
maxValue | Time | — | Maximum wall time. |
locale | string | — | Explicit BCP 47 locale, defaulting to theme context. |
hourCycle | 12 | 24 | — | Explicit 12- or 24-hour cycle; omission follows the locale. |
granularity | TimeGranularity | minute | Smallest editable unit. |
name | string | — | Native form name for HH:mm:ss.SSS. |
form | string | — | Optional external form owner. |
description | string | — | Associated instructions. |
error | string | — | Associated app validation error. |
required | boolean | false | Marks the editor required. |
disabled | boolean | false | Disables editing and projection. |
readOnly | boolean | false | Retains focus while rejecting edits. |