Skip to content

DateRangeField ​

Overview ​

A segment-based date range input built on Reka UI's DateRangeFieldRoot. Renders start and end date segments that users tab through individually. Supports granularity for date-only or datetime range input.

Theme entry: DateRangeField

Props ​

NameTypeRequiredDefaultDescription
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes to apply to the root element.
modelValueobjectundefinedThe controlled date range value. Can be bound as v-model.
defaultValueobjectundefinedThe default value when uncontrolled.
placeholderobjectundefinedThe placeholder date used to determine initial display when no value is set.
defaultPlaceholderobjectundefinedThe default placeholder date.
granularitystringundefinedThe granularity of the date field (e.g. "day", "hour", "minute", "second").
hourCyclenumberundefinedThe hour cycle for time formatting (12 or 24).
stepobjectundefinedThe stepping interval for time fields.
hideTimeZonebooleanundefinedWhether to hide the time zone segment.
maxValueobjectundefinedThe maximum selectable date.
minValueobjectundefinedThe minimum selectable date.
localestringundefinedThe locale used for formatting dates.
disabledbooleanundefinedWhen true, prevents interaction with the date field.
readonlybooleanundefinedWhen true, the field is read-only.
isDateUnavailablefuncundefinedA function that returns whether a date is unavailable.
idstringundefinedThe id of the underlying element.
namestringundefinedThe name submitted with form data.
requiredbooleanfalseWhen true, the field is required.
sizestring"default"Size variant of the segment field shell.
asstring|objectundefinedThe element or component to render as.
asChildbooleanfalseWhen true, merges props onto the child element instead of rendering a wrapper.

Slots ​

default ​

Scoped slot.

Events ​

NameDescription
update:modelValueEmitted when the value changes.
update:placeholderEmitted when the placeholder date changes.

Full event reference

Source ​

client/lib/controls/date-range-field/DateRangeField.vue