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 CalendarViews
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.
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.
Start: — · End: —
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.
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.
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.
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.
Selected: —
Disable past / future
disable-past and disable-future disable all values strictly before or after today. Works in every view.
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.
The middle of the month is blocked but the range can still span over it. Start: — · End: —
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".
Locale
locale controls weekday and month header labels using Intl.DateTimeFormat. Any locale the runtime supports works without extra files.
Week starts on
weekStartsOn controls the first column of the days grid: 0 = Sunday, 1 = Monday (default), … 6 = Saturday. Only applies to view="days".
Loading state
loading replaces day cells with skeletons. Provide a #skeleton slot to customize them.