sheengemologic ui
All components

DateTimePicker

A date, wall-time, and IANA-zone editor that resolves instants without hiding DST ambiguity.@gemologic/sheen-date · date and time

Playground

Maintenance start
Time
800PM
<DateTimePicker label="Maintenance start" name="startsAt" timeZoneOptions={[{ id: "UTC", label: "UTC" }, { id: "America/New_York", label: "New York" }]} defaultValue={createDateTime(1788897600000, createTimeZone("UTC"))}  disambiguation="reject" granularity="minute" timeZoneChangeBehavior="preserve-instant"/>

Variant matrix

Maintenance start
Maintenance start
Time
800PM
disambiguation: reject
Maintenance start
Time
800PM
disambiguation: earlier
Maintenance start
Time
800PM
disambiguation: later
Maintenance start
Time
800PM
disambiguation: compatible
Maintenance start
Time
800PM
timeZoneChangeBehavior: preserve-instant
Maintenance start
Time
800PM
timeZoneChangeBehavior: preserve-wall
Maintenance start
Time
800PM
hourCycle: 12
Maintenance start
Time
800PM
hourCycle: 24
Maintenance start
Time
2000
granularity: minute
Maintenance start
Time
800PM
granularity: second
Maintenance start
Time
80000PM

Anatomy

Package
@gemologic/sheen-date
Source
packages/date/src/DateTimePicker.tsx
Tokens
  • --sheen-color-bg-raised
  • --sheen-color-border-control
  • --sheen-color-warning-border
  • --sheen-color-focus-ring

Accessibility

Role: group, textbox, spinbuttons, combobox, alertKeyboard: Tab, Shift+Tab, Enter, Space, Escape, Arrow keys, PageUp, PageDown, Home, End

Do

  • Keep reject as the default when the app must distinguish repeated or skipped local times.
  • Choose zone-change semantics for the application's domain.

Do not

  • Do not silently substitute the browser timezone or accept an ambiguous wall time.

Generated props

NameTypeDefaultDescription
label *string—Required visible fieldset legend.
valueDateTime | null—App-owned Sheen DateTime instant, or null.
defaultValueDateTime | null—Initial uncontrolled instant.
onValueChange(value: DateTime | null) => void—Receives exact or explicitly disambiguated instants and clearing.
onResolution(resolution: DateTimeResolution) => void—Observes every exact, ambiguous, or nonexistent wall-time resolution.
timeZoneOptions *readonly TimeZoneOption[]—Explicit stable IANA zones passed to the zone combobox.
timeZonePendingbooleanfalseRetains accepted zone options while an app-owned refresh is in flight.
timeZoneErrorstring—Safe app-owned zone request error.
onTimeZoneRetry() => void—Optional app retry action for a failed zone request.
defaultTimeZoneTimeZone—Zone used by an empty draft, defaulting to UTC.
defaultDateCalendarDate—Deterministic empty date placeholder.
defaultTimeTime—Deterministic empty wall-time placeholder.
disambiguationDateTimeDisambiguationrejectPolicy for repeated or skipped local times; reject exposes an explicit choice.
timeZoneChangeBehaviorTimeZoneChangeBehaviorpreserve-instantWhether a zone change preserves the accepted instant or reinterprets the wall time.
localestring—Explicit BCP 47 locale, defaulting to context.
calendarstring—Optional calendar used only for date presentation and interaction.
hourCycle12 | 24—Explicit 12- or 24-hour cycle.
granularity"minute" | "second"minuteSmallest wall-time segment.
namestring—Native form name for the ISO instant with bracketed IANA zone.
formstring—Optional external form owner.
descriptionstring—Associated instructions.
errorstring—Associated app validation error.
dateLabelstring—Localized label for the date subfield.
timeLabelstring—Localized label for the wall-time subfield.
timeZoneLabelstring—Localized label for the zone subfield.
requiredbooleanfalseMarks all subfields required.
disabledbooleanfalseDisables all subfields and projection.
readOnlybooleanfalseAllows inspection while rejecting changes.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.