sheengemologic ui
All components

DateField

A locale-ordered segmented date editor with an ISO form projection.@gemologic/sheen-date · date and time

Playground

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 keys

Do

  • Submit the documented ISO projection instead of reading rendered segments.

Do not

  • Do not pass JavaScript Date objects.

Generated props

NameTypeDefaultDescription
label *stringRequired visible field label.
valueCalendarDate | nullApp-owned Sheen CalendarDate, or null.
defaultValueCalendarDate | nullInitial uncontrolled value.
onValueChange(value: CalendarDate | null) => voidReceives complete valid dates and explicit clearing.
placeholderValueCalendarDateDeterministic values shown behind empty segments.
minValueCalendarDateMinimum valid date.
maxValueCalendarDateMaximum valid date.
isDateUnavailable(value: CalendarDate) => booleanMarks committed dates invalid using Sheen values.
localestringExplicit BCP 47 locale, defaulting to theme context.
calendarstringOptional presentation calendar identifier.
namestringNative form field name for YYYY-MM-DD.
formstringOptional external form owner.
descriptionstringAssociated supporting text.
errorstringAssociated app validation error.
requiredbooleanfalseMarks the segmented editor required.
disabledbooleanfalseDisables editing and form projection.
readOnlybooleanfalseRetains focus while rejecting edits.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.