Skip to content

DatePicker ​

Calendar-driven date selection. Built on @internationalized/date for locale-aware formatting and timezone-correct comparisons. Two trigger styles: a single button (default) or segmented input fields (typed).

Basic ​

html
<DatePicker v-model="value" />

The v-model is a DateValue object by default

DatePicker's v-model type is Ref<DateValue | undefined> (from @internationalized/date) — not Ref<null>. Initialize with ref<DateValue | undefined>(undefined). Pass value-format="iso" to hold a YYYY-MM-DD string (null when empty) instead.

With initial value ​

html
<DatePicker v-model="value" />
ts
const value = ref(today(getLocalTimeZone()))

Typed (segmented input) ​

Use typed when the user benefits from typing each segment (day, month, year) directly — common in dense forms.

mm
dd
yyyy
html
<DatePicker v-model="value" typed />

Clearable ​

The calendar can only replace a date, never remove one. Add clearable on an optional field so the user can empty it again.

html
<DatePicker v-model="value" clearable />

With suggestions ​

Pass an array of preset values to surface as quick picks above the calendar.

html
<DatePicker v-model="value" :suggestions="suggestions" />

suggestions is { label: string; value: DateValue }[].

Validation states ​

html
<DatePicker v-model="value" error />
<DatePicker v-model="value" warning />
<DatePicker v-model="value" missing />

Disabled ​

html
<DatePicker v-model="value" disabled />

Custom placeholder ​

html
<DatePicker v-model="value" placeholder="Choose a deadline" />

Date constraints ​

min-value and max-value restrict the selectable range. Dates outside the range render disabled in the calendar.

html
<DatePicker
  v-model="date"
  :min-value="new CalendarDate(2024, 1, 1)"
  :max-value="new CalendarDate(2024, 12, 31)"
/>
ts
import { CalendarDate } from '@internationalized/date'

API serialization ​

Two ways. For a form bound straight to a record, value-format="iso" makes the model the YYYY-MM-DD string the API stores (null when empty) — no transform on either side:

html
<DatePicker v-model="record.construction_date" value-format="iso" />

Otherwise the v-model holds a DateValue object (@internationalized/date). When sending to an API, call .toString() to get the ISO date format:

ts
api.post('/endpoint', {
    ...values,
    date: values.date?.toString(), // "2026-03-19"
})

With vee-validate + Zod, transform on submit:

ts
import type { DateValue } from '@scaler-tech/aurora/date-picker'

const schema = z.object({
    date: z.custom<DateValue>().transform(v => v.toString()),
})

Props ​

PropTypeDefaultDescription
modelValueDateValue | undefined — or string | null with valueFormat: 'iso'undefinedSelected date. Use with v-model.
valueFormat'date-value' | 'iso''date-value'iso makes the model a YYYY-MM-DD string (null when empty) instead of a DateValue.
placeholderstring'Pick a date'Trigger text shown when no date is selected.
typedbooleanfalseRender the trigger as a segmented input instead of a single button.
clearablebooleanfalseShow a clear control once a date is picked, so an optional field can be emptied again.
suggestions{ label: string; value: DateValue }[]—Quick-pick presets shown above the calendar.
closeOnSelectbooleantrueClose the popover after a date is picked.
minValueDateValue—Earliest selectable date. Dates before this render disabled.
maxValueDateValue—Latest selectable date. Dates after this render disabled.
disabledbooleanfalseDisable interactions.
readonlybooleanfalseRead-only display.
errorbooleanfalseApply error state styling.
successbooleanfalseApply success state styling.
warningbooleanfalseApply warning state styling.
missingbooleanfalseApply missing-required-field state styling.

DatePicker extends reka-ui's DatePickerRoot props (omitting placeholder and modelValue which aurora overrides). Range, min/max, and isDateUnavailable are accepted but not surfaced in this table — see reka-ui DatePicker docs for the full underlying API.

Adapter contract ​

The trigger button uses DS_DATE_FORMATTER to format the selected date. Aurora's default formatter passes through @internationalized/date formatting; override DS_DATE_FORMATTER at the app root to apply locale-specific or custom rendering.