DateField
A locale-ordered segmented date editor with an ISO form projection.@gemologic/sheen-date · date and timePlayground
This example has no scalar controls. Its validated source remains interactive below.
Invoice date
982026
<DateField label="Invoice date" name="invoiceDate" defaultValue={createCalendarDate(2026, 9, 8)} />Variant matrix
Invoice date
Invoice date
982026
Anatomy
- Package
@gemologic/sheen-date- Source
packages/date/src/DateField.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
- Submit the documented ISO projection instead of reading rendered segments.
Do not
- Do not pass JavaScript Date objects.
Generated props
| Name | Type | Default | Description |
|---|---|---|---|
label * | string | — | Required visible field label. |
value | CalendarDate | null | — | App-owned Sheen CalendarDate, or null. |
defaultValue | CalendarDate | null | — | Initial uncontrolled value. |
onValueChange | (value: CalendarDate | null) => void | — | Receives complete valid dates and explicit clearing. |
placeholderValue | CalendarDate | — | Deterministic values shown behind empty segments. |
minValue | CalendarDate | — | Minimum valid date. |
maxValue | CalendarDate | — | Maximum valid date. |
isDateUnavailable | (value: CalendarDate) => boolean | — | Marks committed dates invalid using Sheen values. |
locale | string | — | Explicit BCP 47 locale, defaulting to theme context. |
calendar | string | — | Optional presentation calendar identifier. |
name | string | — | Native form field name for YYYY-MM-DD. |
form | string | — | Optional external form owner. |
description | string | — | Associated supporting text. |
error | string | — | Associated app validation error. |
required | boolean | false | Marks the segmented editor required. |
disabled | boolean | false | Disables editing and form projection. |
readOnly | boolean | false | Retains focus while rejecting edits. |