Calendar

A calendar component for selecting dates, months, or years — individually or as ranges.

Install

Run the following command to install the calendar component:

npx acc-nuxt add Calendar

Views

The calendar supports three views via the view prop: days (default), months, and years. Each view binds to a different model so you can use them independently. The examples below use mode="single"; range mode works the same way with the corresponding range model (selected-date-range / selected-month-range / selected-year-range).

Days (default)

Omitting view (or passing days) shows the day grid. Bind v-model:selected-date for single selection or v-model:selected-date-range for ranges.

MoTuWeThFrSaSu

Selected: —

Months

Year: 2026 · Selected: —

Years

Selected: —

Range selection

Set mode="range" to pick a start and end. The same pattern works across all three views — only the bound model changes.

MoTuWeThFrSaSu

Start: — · End: —

Week selection

Set mode="week" and bind v-model:selected-date-range to select seven days with one click. Week mode always uses the day grid. Hover previews the whole week in a separate color while keeping the selected week highlighted.

weekStartsOn controls the first day (Monday by default). Adjacent-month days are shown so each week is complete.

Date limits and maximumSelection must allow all seven days. The first and last days must be enabled. Set :allow-gaps="false" to require every day to be enabled.

MoTuWeThFrSaSu

Week: — to —

Maximum selection

maximumSelection limits how many units a range can span. The unit matches the active view: days for days, months for months, years for years.

MoTuWeThFrSaSu

Start: — · End: —

Disabling

Several props restrict which values a user can pick. They work in every view and combine with each other.

Disabled dates (blacklist)

Pass an array of values to disabledDates to disable them. The format must match the active view: YYYY-MM-DD for days, YYYY-MM for months, YYYY for years.

MoTuWeThFrSaSu

Weekends are disabled. Selected: —

Enabled dates (whitelist)

enabledDates is the inverse: only values in the array are selectable, everything else is disabled. Works in every view.

MoTuWeThFrSaSu

Only Mondays are enabled. Selected: —

Minimum and maximum date

Use minDate and maxDate to define an inclusive selectable range. Values before minDate or after maxDate are disabled. The format must match the active view.

MoTuWeThFrSaSu

Selected: —

Disable past / future

disable-past and disable-future disable all values strictly before or after today. Works in every view.

MoTuWeThFrSaSu
MoTuWeThFrSaSu
MoTuWeThFrSaSu
MoTuWeThFrSaSu

Allow gaps

By default (:allow-gaps="true"), a range can pass over disabled values. Set :allow-gaps="false" to prevent this — the range resets when it would cross a gap. Applies to all views.

MoTuWeThFrSaSu

The middle of the month is blocked but the range can still span over it. Start: — · End: —

MoTuWeThFrSaSu

The middle of the month is blocked — picking a start before it and an end after it resets the range. Start: — · End: —

Multiple months

numberOfMonths displays several months side by side. Only applies to view="days".

MoTuWeThFrSaSu
MoTuWeThFrSaSu

Locale

locale controls weekday and month header labels using Intl.DateTimeFormat. Any locale the runtime supports works without extra files.

MaDiWoDoVrZaZo

Week starts on

weekStartsOn controls the first column of the days grid: 0 = Sunday, 1 = Monday (default), … 6 = Saturday. Only applies to view="days".

SuMoTuWeThFrSa

Loading state

loading replaces day cells with the component's internal skeleton.

MoTuWeThFrSaSu

Controlled current month/year

currentMonth and currentYear are v-model bindings, so you can drive navigation from outside the calendar.

10/2026
MoTuWeThFrSaSu

Props

mode:'single' | 'range' | 'week'— optional
default:single
Select a single value, a range, or a seven-day week. Week mode always uses the day grid.
view:'days' | 'months' | 'years'— optional
default:days
Grid granularity: pick a day, a month, or a year.
disablePast:boolean— optional
default:false
Disable all values strictly before today.
disableFuture:boolean— optional
default:false
Disable all values strictly after today.
locale:string— optional
default:en
Locale code for weekday/month header labels.
weekStartsOn:0 | 1 | 2 | 3 | 4 | 5 | 6— optional
default:1
Day the week starts on (0 = Sunday … 6 = Saturday). Only applies to view="days".
numberOfMonths:number— optional
default:1
Number of months to display side by side. Only applies to view="days".
maximumSelection:number— optional
default:undefined
Maximum number of units selectable in a range. The unit matches the active view (days/months/years).
disabledDates:string[]— optional
default:undefined
Blacklist of disabled values. Format must match the active view: YYYY-MM-DD, YYYY-MM, or YYYY.
enabledDates:string[]— optional
default:undefined
Whitelist of enabled values; all others are disabled. Format must match the active view.
minDate:string— optional
default:undefined
Minimum inclusive value. Values before it are disabled; format must match the active view.
maxDate:string— optional
default:undefined
Maximum inclusive value. Values after it are disabled; format must match the active view.
loading:boolean— optional
default:false
Show skeleton cells instead of day buttons while data is loading.
allowGaps:boolean— optional
default:true
When false, range selection cannot pass over a disabled value — the range resets instead.

Bindings

v-model:selected-date:string
Selected day value in YYYY-MM-DD format.
v-model:selected-date-range:RangeValue
Selected day range or complete week in YYYY-MM-DD format.
v-model:selected-month:string
Selected month value in YYYY-MM format.
v-model:selected-month-range:RangeValue
Selected month range in YYYY-MM format.
v-model:selected-year:string
Selected year value in YYYY format.
v-model:selected-year-range:RangeValue
Selected year range in YYYY format.
v-model:current-month:number
Visible month number from 1 to 12.
v-model:current-year:number
Visible year used to anchor the calendar view.

Emits

@select
Emitted after selecting an enabled cell, including the same value again. Receives the clicked day (YYYY-MM-DD), month (YYYY-MM), or year (YYYY); week mode receives the clicked day.
@update:selectedDate
Emitted when the selected date changes.
@update:selectedDateRange
Emitted when the selected date range changes.
@update:selectedMonth
Emitted when the selected month changes.
@update:selectedMonthRange
Emitted when the selected month range changes.
@update:selectedYear
Emitted when the selected year changes.
@update:selectedYearRange
Emitted when the selected year range changes.
@update:currentMonth
Emitted when the visible month changes.
@update:currentYear
Emitted when the visible year changes.

CSS Variables

--lev-calendar-grid-gap
default:40px
Gap between month grids when numberOfMonths > 1.
--lev-calendar-row-gap
default:2px
Vertical gap between rows inside a grid.
--lev-calendar-column-gap
default:0px
Horizontal gap between columns inside a grid.
--lev-calendar-weekday-padding
default:8px 6px
Padding of weekday header labels.
--lev-calendar-weekday-color
default:#464747
Text color of weekday header labels.
--lev-calendar-weekday-font-size
default:12px
Font size of weekday header labels.
--lev-calendar-weekday-line-height
default:14px
Line height of weekday header labels.
--lev-calendar-cell-padding-y
default:8px
Vertical padding of a selectable cell.
--lev-calendar-cell-padding-x
default:6px
Horizontal padding of a selectable cell.
--lev-calendar-cell-font-size
default:14px
Font size of selectable cells.
--lev-calendar-cell-line-height
default:18px
Line height used for skeleton height calculation.
--lev-calendar-cell-bg
default:#ffffff
Background color of a selectable cell.
--lev-calendar-cell-color
default:#141414
Text color of a selectable cell.
--lev-calendar-cell-border
default:1px solid transparent
Border of a selectable cell.
--lev-calendar-cell-border-radius
default:4px
Border radius of a selectable cell.
--lev-calendar-cell-hover-border-color
default:#464747
Border color of a hovered, non-selected cell.
--lev-calendar-cell-disabled-color
default:color-mix(in srgb, currentColor 30%, transparent)
Text color of a disabled cell.
--lev-calendar-cell-current-period-hover-bg
default:#e1e4e5
Background of a hovered current-period cell.
--lev-calendar-cell-week-preview-bg
default:#e1e4e5
Background of the full-week hover preview in week mode.
--lev-calendar-cell-selected-bg
default:#1d66bf
Background of a selected / start / end cell.
--lev-calendar-cell-selected-color
default:#ffffff
Text color of a selected / start / end cell.
--lev-calendar-cell-between-bg
default:#e8f0f9
Background of a cell between start and end.
--lev-calendar-cell-range-radius
default:8px
Outer corner radius applied to start (left) and end (right) cells.