sheengemologic ui
All components

DateRangePicker

A two-ended date picker that keeps its incomplete range draft while accepted state refreshes.@gemologic/sheen-date · date and time

Playground

This example has no scalar controls. Its validated source remains interactive below.
<DateRangePicker label="Report window" name="window" defaultValue={createDateRange(createCalendarDate(2026, 9, 1), createCalendarDate(2026, 9, 8))} />

Variant matrix

Report window

Anatomy

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

Accessibility

Role: two textboxes and calendar dialogKeyboard: Tab, Enter, Space, Escape, Arrow keys, PageUp, PageDown, Home, End

Do

  • Treat a one-ended calendar interaction as a draft, not an accepted range.

Do not

  • Do not infer missing endpoints or submit two unrelated fields.

Generated props

NameTypeDefaultDescription
valueDateRange | null—App-owned ordered Sheen DateRange, or null.
defaultValueDateRange | null—Initial uncontrolled accepted range.
onValueChange(value: DateRange | null) => void—Receives only complete ordered ranges or explicit clearing.
presetsreadonly DateRangePreset[]—Deterministic labeled Sheen range shortcuts.
endLabelstring—Accessible label for the second endpoint, defaulting to the range label plus end.
label *string—Required visible range label.
minValueCalendarDate—Earliest selectable endpoint.
maxValueCalendarDate—Latest selectable endpoint.
isDateUnavailable(value: CalendarDate) => boolean—Marks endpoint dates unavailable.
defaultVisibleDateCalendarDate—Deterministic initially visible month.
localestring—Explicit BCP 47 locale, defaulting to theme context.
calendarstring—Optional presentation calendar identifier.
namestring—Native form name for the start/end ISO interval.
formstring—Optional external form owner.
descriptionstring—Associated instructions.
errorstring—Associated app validation error.
placeholderstring—Empty endpoint placeholder.
requiredbooleanfalseMarks both endpoints required.
disabledbooleanfalseDisables interaction and projection.
readOnlybooleanfalseAllows inspection while rejecting changes.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.