date-field

Date Field

A date typed one segment at a time, in the order and format of the user's locale; joins a Field around it.

Parts

PartFileDoes
DateFieldDateField.vueLets the user type a date one segment at a time, in the order and format of their locale.
DateFieldInputDateFieldInput.vueOne segment of the date, such as the day or the month, or a separator between two.

Anatomy

<DateField>
  <DateFieldInput />
</DateField>

Styling

All of Date Field’s styles live in date-field.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@vueuse/core
reka-ui

API reference

DateField.vue

Lets the user type a date one segment at a time, in the order and format of their locale. Inside a DatePicker or DateRangePicker it takes the picker's dates and settings.

Props 22

PropTypeDefault
defaultValueDateValue—
defaultPlaceholderDateValue—
placeholderDateValue—
modelValueDateValue | null—
hourCycleHourCycle—
stepDateStep—
stepSnappingbooleanfalse
granularityGranularity—
hideTimeZonebooleanfalse
maxValueDateValue—
minValueDateValue—
localestring—
disabledbooleanfalse
readonlybooleanfalse
isDateUnavailableMatcher—
idstring—
dirDirection—
asChildbooleanfalse
asAsTag | Component—
namestring—
requiredbooleanfalse
classClassValue—

Events 2

EventPayload
update:modelValuedate: DateValue | undefined
update:placeholderdate: DateValue

Slots 2

SlotSlot props
default{ segments: Segment[] | { start: Segment[]; end: Segment[]; }; modelValue: DateValue | DateRange | null | undefined; isInvalid?: boolean | undefined; }
end—

Recipe date-field 2 groups

DateFieldInput.vue
Date Field
State