Skip to main content
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

createCalendar

Edit
Report a Bug
Issues
Source
Markdown

PreviewIntermediateOct 31, 2026

A Gregorian month grid with single and range selection. Days outside the minimum and maximum are disabled, and disabled can name individual days.

Usage

ts
import { createCalendar } from '@vuetify/v0'

const calendar = createCalendar({
  month: '2026-08',
  min: '2026-08-10',
  disabled: iso => iso === '2026-08-15',
})

calendar.select('2026-08-12')
calendar.month.value.weeks
calendar.today() // pages to today and selects nothing

Adapters

Inside a component, an omitted adapter comes from the installed date plugin. useDate reads that same context, so both share its DateAdapter, locale, and week start. The grid does not call useDate(). That call throws outside a component. There, or with no plugin, the grid constructs a V0PlainDateAdapter. It does not install the plugin.

The first match wins:

SourceWhat the grid uses
The adapter argumentThat instance. This call does not write its locale or its week start, and it does not read the plugin
An installed date plugin, inside a componentThat plugin’s adapter, locale, and week start. This is the context useDate() returns
Nothing installed, or a call outside a componentA new V0PlainDateAdapter, a JavaScript Date. useDate() throws outside a component. This call does not

locale is applied only in the last case. firstDayOfWeek overrides the week start for this grid and is not written back onto a borrowed adapter.

Weeks are built with addDays from that week start. The grid does not call getWeekArray. Column labels are Intl weekday names in the resolved locale. The month title uses the adapter’s monthAndYear format. On the public surface a month is YYYY-MM and a day is YYYY-MM-DD. The adapter’s own value, a Date or a Temporal date, stays inside the grid.

AdapterImportRole here
V0PlainDateAdapter@vuetify/v0Default when this call owns the engine
V0DateAdapter@vuetify/v0/dateTemporal. Pass it, or install the date plugin with it
A DateAdapter subclassYour modulePass it, or install it on the plugin

Writing a subclass is covered on the useDate page.

Plugin
import { createCalendar, createDatePlugin } from '@vuetify/v0'
import { V0DateAdapter } from '@vuetify/v0/date'

app.use(
  createDatePlugin({
    adapter: new V0DateAdapter(),
    locale: 'en-US',
  }),
)

// In a component. useDate() borrows this adapter too.
const calendar = createCalendar({ firstDayOfWeek: 1 })

Architecture

month, focused, and value stay on the grid. Day math and the month title go through the DateAdapter. Weeks are built with addDays from the week start.

createCalendar Architecture

Use controls to zoom and pan. Click outside or press Escape to close.

createCalendar Architecture

Options

OptionTypeDefaultPurpose
mode'single' | 'range''single'One day, or a start and end. A ref is read live. Inside a component, changing it clears the selection
monthYYYY-MMcurrent monthVisible month. A ref is written back when the grid pages, and when min or max clamps the month it started on
valueISO day or { start, end }unsetSelection. A ref is written back
min / maxYYYY-MM-DDunsetDays outside the range are disabled
disabledboolean | string[] | (iso) => booleanfalsetrue disables every day. An array of YYYY-MM-DD days, or a function, disables the days it names. Paging still runs
readonlybooleanfalseselect no-ops. Days are not marked disabled
firstDayOfWeek0–6adapter localeSunday is 0. Does not write the adapter
fixedWeeksbooleanfalsePad the grid to six rows
mandatorybooleanfalseIn single mode a second click keeps the day. unselect() does nothing
localestringadapter defaultApplied only when this call owns the adapter
namespacestring'v0:date'Date plugin to borrow when adapter is omitted
weekdayFormat'long' | 'short' | 'narrow''narrow'Column labels

Selection

Single mode stores one YYYY-MM-DD string. A second click on that day clears it, unless mandatory is set. unselect() clears it too, and also does nothing when mandatory is set. Writing the value ref from outside still replaces the day.

Range mode stores { start, end }.

  • The first click sets start.

  • While the range is open, a click on or after start sets end.

  • A click before start moves start and leaves the range open. It does not swap the ends.

  • A click once both ends exist starts a new range at that day.

  • An open range (start and no end) completes on a click on or after start. A click before start moves start.

mode may be a ref or a getter. Inside a component, switching it clears the selection and writes that empty value back. mandatory does not keep the previous day. The next click starts in the new mode.

select refuses a spill day and a disabled day. A spill day before year 0000 or after year 9999 is disabled, because it is not a YYYY-MM-DD day. Days between the ends can still be disabled. readonly makes select and unselect do nothing, and it does not mark cells disabled. Paging still runs.

Reactivity

PropertyReactiveNotes
monthOne month object. weeks is the cell grid
weekdaysSeven labels, rotated to firstDayOfWeek
labelLocalized month and year
anchorVisible month, YYYY-MM
focusedDay the grid is on. May be disabled
valueSelected day, or { start, end }
isFirst / isLastVisible month is against min, max, or the first or last representable month
select / today / moveMethods

today() pages to the current month and focuses today. It does not select. selectToday() selects today when that day is allowed.

When the grid borrows a date plugin, label and weekdays follow that plugin’s locale, and the week start follows the plugin unless firstDayOfWeek is set. When this call owns the adapter, a locale ref does the same for the title, the labels, and the week columns. The title for year 0000 follows Intl, which numbers that year 1. In the browser, the today marker moves at local midnight.

Examples

A range across closed days

The grid opens on the current month. The 12th through the 20th start selected. The 10th is the minimum, so earlier days are disabled. The 15th and 16th are disabled and sit inside that range. Today has a rounded outline.

The first and last days use a solid primary fill and on-primary text. Days between them use a primary tint. A click starts a new range, and the next click sets the end. Disabled and spill days cannot become an endpoint. value is { start, end }.

Single and Range switch mode on the same grid. The switch clears the selection. Single mode then selects one day, and a second click clears it unless mandatory is set. fixedWeeks is off, so the grid is only as tall as the month. Prev and next page the month.

FileRole
month.tsCurrent-month dates, the caption, and the range marks
CalendarGrid.vueMonth title, paging, and the day buttons
basic.vueCreates the calendar, switches mode, and reads the caption
November 2026
SMTWTFS

2026-11-12 to 2026-11-20

Theme
Mode
Palettes
Accessibility

FAQ

Discord
Need help? Join our community for support and discussions ↗

API Reference

The following API details are for the createCalendar composable.
Was this page helpful?

© 2016-1970 Vuetify, LLC
Services
Ctrl+/