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 *stringRequired visible fieldset legend.
valueDateTime | nullApp-owned Sheen DateTime instant, or null.
defaultValueDateTime | nullInitial uncontrolled instant.
onValueChange(value: DateTime | null) => voidReceives exact or explicitly disambiguated instants and clearing.
onResolution(resolution: DateTimeResolution) => voidObserves 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.
timeZoneErrorstringSafe app-owned zone request error.
onTimeZoneRetry() => voidOptional app retry action for a failed zone request.
defaultTimeZoneTimeZoneZone used by an empty draft, defaulting to UTC.
defaultDateCalendarDateDeterministic empty date placeholder.
defaultTimeTimeDeterministic 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.
localestringExplicit BCP 47 locale, defaulting to context.
calendarstringOptional calendar used only for date presentation and interaction.
hourCycle12 | 24Explicit 12- or 24-hour cycle.
granularity"minute" | "second"minuteSmallest wall-time segment.
namestringNative form name for the ISO instant with bracketed IANA zone.
formstringOptional external form owner.
descriptionstringAssociated instructions.
errorstringAssociated app validation error.
dateLabelstringLocalized label for the date subfield.
timeLabelstringLocalized label for the wall-time subfield.
timeZoneLabelstringLocalized 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.