Skip to content

DateField

Overview

A segment-based date input built on Reka UI's DateFieldRoot. Users tab through individual year, month, day (and optional time) segments. Supports granularity for date-only or datetime input.

Theme entry: DateField

Props

NameTypeRequiredDefaultDescription
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes to apply to the root element.
modelValueobjectundefinedThe controlled date 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-field/DateField.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2