Component
Vue Calendar Component
<DomCalendar>A compact month calendar for choosing a date, with month and year navigation.
Playground
Try every prop live
Calendar playground
Use the controls to move by month or year, then select a day in the grid.
June 2026
Pick a date for the booking.
Properties
Control props
Selected date as YYYY-MM-DD.
Locale used for month and weekday labels.
First day of week. 0 is Sunday, 1 is Monday.
Initial visible month, 1-12. Ignored when modelValue has a valid date.
Initial visible year. Ignored when modelValue has a valid date.
Minimum selectable date as YYYY-MM-DD.
Maximum selectable date as YYYY-MM-DD.
Optional allow-list of selectable YYYY-MM-DD dates. When empty, every date inside the min/max range is selectable.
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 { DomCalendar } from '@getdom/studio';
const data = reactive({
"modelValue": "2026-06-18",
"id": "",
"name": "",
"label": "Booking date",
"description": "Pick a date for the booking.",
"placeholder": "",
"required": false,
"disabled": false,
"readOnly": false,
"invalid": false,
"errors": [],
"visible": true,
"validators": [],
"validateOnBlur": true,
"chrome": "field",
"locale": "en-GB",
"weekStartsOn": 1,
"initialMonth": 6,
"initialYear": 2026,
"min": "2026-01-01",
"max": "2026-12-31",
"enabledDates": [],
"showAdjacentDays": true,
"fixedWeeks": true,
"registerField": true,
"nativeInput": true
});
</script>
<template>
<DomCalendar
v-bind="data"
@update:modelValue="data.modelValue = $event"
/>
</template>Demo
Month date picker
The calendar emits a simple YYYY-MM-DD value that can be stored in a form or sent to an API.
June 2026
Use the month and year controls to move through the calendar.
Selected date: 2026-06-18
npm install @getdom/studio<script setup>
import '@getdom/studio/style.css';
import { ref } from 'vue';
import { DomCalendar } from '@getdom/studio';
const date = ref('2026-06-18');
</script>
<template>
<div class="w-full max-w-sm">
<DomCalendar
v-model="date"
label="Booking date"
description="Use the month and year controls to move through the calendar."
min="2026-01-01"
max="2026-12-31"
/>
<p class="mt-3 text-xs text-muted-fg">
Selected date: <code class="text-canvas-fg">{{ date }}</code>
</p>
</div>
</template>
Reference
Props
Control props
| Name | Type | TS | Default | Description |
|---|---|---|---|---|
modelValue | string | string | '' | Selected date as YYYY-MM-DD. |
disabled | boolean | boolean | false | Disable date selection. |
locale | string | string | 'en-GB' | Locale used for month and weekday labels. |
weekStartsOn | 0 | 1 | 2 | 3 | 4 | 5 | 6 | number | 1 | First day of week. 0 is Sunday, 1 is Monday. |
initialMonth | number | number | — | Initial visible month, 1-12. Ignored when modelValue has a valid date. |
initialYear | number | number | — | Initial visible year. Ignored when modelValue has a valid date. |
min | string | string | '' | Minimum selectable date as YYYY-MM-DD. |
max | string | string | '' | Maximum selectable date as YYYY-MM-DD. |
enabledDatests | array | Array< | [] | Optional allow-list of selectable dates as YYYY-MM-DD values. |
showAdjacentDays | boolean | boolean | true | Show dates from the previous and next months in the grid. |
fixedWeeks | boolean | boolean | true | Always render six weeks so the calendar height stays stable. |
registerField | boolean | boolean | true | Register with a parent form. Disable when embedding the calendar inside another form control. |
nativeInput | boolean | boolean | true | Render the hidden native input used for HTML form submission. |
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. |
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 Calendar.props and inline _edit hints.
Events
| Name | Payload | Description |
|---|---|---|
| @update:modelValue | YYYY-MM-DD | Fired when a date is selected. |
| @change | YYYY-MM-DD | Fired when a date is selected. |
| @view-change | ({ month, year }) | Fired when the visible month or year changes. |
| @focus | — | — |
| @blur | — | — |
Names auto-detected from defineEmits and source emit() calls; payload and description from __doc.events when present.