Component
Vue Date Picker Component
<DomDatePicker>A text date input with a popover calendar picker. Stores YYYY-MM-DD while letting people type dd/mm/yyyy or mm/dd/yyyy.
Playground
Try every prop live
Date picker playground
The text box stores a YYYY-MM-DD value. Pass calendarProps and popoverProps to configure the composed calendar and popover.
June 2026
Type dd/mm/yyyy or pick from the calendar.
Properties
Control props
Selected date as YYYY-MM-DD.
How typed dates are parsed and displayed.
Popover Props
bottom-end
Props passed to the inner DomPopover. Date picker defaults position to bottom-end, width to w-[20rem], padding to p-0, and arrow to true.
Calendar Props
Props passed to the inner DomCalendar, such as locale, weekStartsOn, min, max, fixedWeeks, and showAdjacentDays.
Field props
Optional ID override. By default parent forms derive the input ID from the field path using underscores.
Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy.
Visible field label.
Optional helper copy below the field.
Placeholder shown when the control is empty.
Validation errors for this field.
Validators
No validators yet.
Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas.
Render default field chrome, or hide chrome while keeping form state wiring.
npm install @getdom/studio<script setup>
import '@getdom/studio/style.css';
import { reactive } from 'vue';
import { DomDatePicker } from '@getdom/studio';
const data = reactive({
"modelValue": "2026-06-18",
"id": "",
"name": "",
"label": "Appointment date",
"description": "Type dd/mm/yyyy or pick from the calendar.",
"placeholder": "",
"required": false,
"disabled": false,
"readOnly": false,
"invalid": false,
"errors": [],
"visible": true,
"validators": [],
"validateOnBlur": true,
"chrome": "field",
"dateFormat": "dd/mm/yyyy",
"popoverProps": {
"position": "bottom-end"
},
"calendarProps": {
"min": "2026-01-01",
"max": "2026-12-31"
}
});
</script>
<template>
<DomDatePicker
v-bind="data"
@update:modelValue="data.modelValue = $event"
/>
</template>Demo
UK date format
Use dd/mm/yyyy for typed dates while storing the value as YYYY-MM-DD.
June 2026
Type a date or choose one from the calendar.
Stored value: 2026-06-18
npm install @getdom/studio<script setup>
import '@getdom/studio/style.css';
import { ref } from 'vue';
import { DomDatePicker } from '@getdom/studio';
const date = ref('2026-06-18');
</script>
<template>
<div class="max-w-sm space-y-4">
<DomDatePicker
v-model="date"
name="booking_date"
label="Booking date"
description="Type a date or choose one from the calendar."
date-format="dd/mm/yyyy"
:calendar-props="{ min: '2026-01-01', max: '2026-12-31' }"
/>
<p class="rounded-xl border border-border bg-secondary px-3 py-2 text-sm text-muted-fg">
Stored value:
<code class="font-mono text-canvas-fg">{{ date || 'empty' }}</code>
</p>
</div>
</template>
Demo
US date format
Switch to mm/dd/yyyy and en-US calendar labels for US-facing forms.
November 2026
This example parses and displays typed dates as mm/dd/yyyy.
Stored value: 2026-11-24
npm install @getdom/studio<script setup>
import '@getdom/studio/style.css';
import { ref } from 'vue';
import { DomDatePicker } from '@getdom/studio';
const date = ref('2026-11-24');
</script>
<template>
<div class="max-w-sm space-y-4">
<DomDatePicker
v-model="date"
name="delivery_date"
label="Delivery date"
description="This example parses and displays typed dates as mm/dd/yyyy."
date-format="mm/dd/yyyy"
:calendar-props="{ locale: 'en-US', weekStartsOn: 0 }"
/>
<p class="rounded-xl border border-border bg-secondary px-3 py-2 text-sm text-muted-fg">
Stored value:
<code class="font-mono text-canvas-fg">{{ date || 'empty' }}</code>
</p>
</div>
</template>
Reference
Props
Control props
| Name | Type | TS | Default | Description |
|---|---|---|---|---|
modelValue | string | string | '' | Selected date as YYYY-MM-DD. |
dateFormat | 'dd/mm/yyyy' | 'mm/dd/yyyy' | string | 'dd/mm/yyyy' | How typed dates are parsed and displayed. |
popoverProps | object | Record<string, unknown> | {} | Props passed to the inner DomPopover. Date picker defaults position to bottom-end, width to w-[20rem], padding to p-0, and arrow to true. |
calendarProps | object | Record<string, unknown> | {} | Props passed to the inner DomCalendar, such as locale, weekStartsOn, min, max, fixedWeeks, and showAdjacentDays. |
Field props
| Name | Type | TS | Default | Description |
|---|---|---|---|---|
id | string | string | '' | Optional ID override. By default parent forms derive the input ID from the field path using underscores. |
name | string | string | '' | Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy. |
label | string | string | '' | Visible field label. |
description | string | string | '' | Optional helper copy below the field. |
placeholder | string | string | '' | Placeholder shown when the control is empty. |
required | boolean | boolean | false | Mark the field as required. |
disabled | boolean | boolean | false | Disable field interaction. |
readOnly | boolean | boolean | false | Show the value but prevent editing. |
invalid | boolean | boolean | false | Mark the field invalid. |
errorsts | array | object | string | Array< | [] | Validation errors for this field. |
visible | boolean | boolean | true | Show or hide the field. |
validators | array | Array<unknown> | [] | Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas. |
validateOnBlur | boolean | boolean | true | Run validators when the field loses focus. |
chrome | 'field' | 'none' | false | string | 'field' | Render default field chrome, or hide chrome while keeping form state wiring. |
Auto-generated from Date picker.props and inline _edit hints.
Events
| Name | Payload | Description |
|---|---|---|
| @update:modelValue | YYYY-MM-DD | Fired when a valid date is typed or selected. |
| @change | YYYY-MM-DD | Fired when a valid date is committed. |
| @invalid-date | string | Fired when typed text cannot be parsed or is outside the allowed range. |
| @focus | FocusEvent | Fired when the text input receives focus. |
| @blur | FocusEvent | Fired when the text input loses focus. |
Names auto-detected from defineEmits and source emit() calls; payload and description from __doc.events when present.
Keyboard
- Alt + ArrowDownOpen the calendar popover.
- EnterCommit the typed date when it is valid.
- EscClose the popover.
- Arrow keys in calendarMove focus by day or week once the calendar is open.