v3.3.1

Styles

styles provides the ability to override any CSS class in the calendar. You can replace any values with a list of CSS classes.

Below is a list of all default classes.

CSS Classes

ts
new Calendar('#calendar', {
  styles: {
    // Basics
    calendar: 'vc',
    controls: 'vc-controls',
    grid: 'vc-grid',
    column: 'vc-column',
 
    // Header
    header: 'vc-header',
    headerContent: 'vc-header__content',
    month: 'vc-month',
    year: 'vc-year',
    arrowPrev: 'vc-arrow vc-arrow_prev',
    arrowNext: 'vc-arrow vc-arrow_next',
 
    // Month / year picker
    wrapper: 'vc-wrapper',
    content: 'vc-content',
    months: 'vc-months',
    monthsRow: 'vc-months__row',
    monthsCell: 'vc-months__cell',
    monthsMonth: 'vc-months__month',
    years: 'vc-years',
    yearsRow: 'vc-years__row',
    yearsCell: 'vc-years__cell',
    yearsYear: 'vc-years__year',
 
    // Week row / week numbers
    week: 'vc-week',
    weekDay: 'vc-week__day',
    weekDayBtn: 'vc-week__day-btn',
    weekNumbers: 'vc-week-numbers',
    weekNumbersTitle: 'vc-week-numbers__title',
    weekNumbersContent: 'vc-week-numbers__content',
    weekNumber: 'vc-week-number',
 
    // Dates
    collapse: 'vc-collapse',
    dates: 'vc-dates',
    datesRow: 'vc-dates__row',
    date: 'vc-date',
    dateBtn: 'vc-date__btn',
 
    // Popups and tooltip
    datePopup: 'vc-date__popup',
    dateRangeTooltip: 'vc-date-range-tooltip',
 
    // Time controls
    time: 'vc-time',
    timeContent: 'vc-time__content',
    timeHour: 'vc-time__hour',
    timeMinute: 'vc-time__minute',
    timeKeeping: 'vc-time__keeping',
    timeRanges: 'vc-time__ranges',
    timeRange: 'vc-time__range',
  },
});

CSS Variables

Every color in the built-in themes (light, dark, slate-light) is defined through a CSS custom property with the theme's original color as the fallback. This means you can restyle the calendar by setting a handful of variables, without touching any CSS classes or waiting for a theme override to cascade correctly.

css
:root {
  --vc-date-selected-bg: #7c3aed;
  --vc-date-selected-color: #fff;
}

If a variable is left unset, the calendar renders exactly as before — nothing changes unless you explicitly set a variable.

Setting a variable on :root applies it across all themes at once (light/dark/slate-light all read the same variable names). To restyle only one theme, scope the override to that theme's selector instead, e.g. [data-vc-theme='dark'] { --vc-date-selected-bg: #7c3aed; }.

Base

Variablelightdarkslate-light
--vc-bgwhiteslate-900slate-100
--vc-colorslate-900whitegray-800
--vc-focus-outline-colororange-300orange-300blue-300

Header / title

Variablelightdarkslate-light
--vc-header-colorslate-900whitegray-800
--vc-title-colorslate-900whitegray-800
--vc-title-color-hoverslate-500slate-500gray-600
--vc-title-color-disabledslate-300slate-700gray-400

Month / year picker

Variablelightdarkslate-light
--vc-months-years-bgwhiteslate-900slate-100
--vc-months-years-colorslate-500whitegray-600
--vc-months-years-bg-hoverslate-100slate-800slate-200
--vc-months-years-color-disabledslate-300slate-700gray-400
--vc-months-years-bg-selectedcyan-500slate-500blue-500
--vc-months-years-color-selectedwhitewhitewhite

Collapse control

Variablelightdarkslate-light
--vc-collapse-colorslate-300slate-600slate-300

Week row / week numbers

Variablelightdarkslate-light
--vc-week-numbers-title-colorslate-500whitegray-600
--vc-week-number-colorslate-500whitegray-600
--vc-week-number-color-hoverslate-600slate-300gray-800
--vc-week-day-colorslate-500whitegray-600
--vc-week-day-color-hoverslate-600slate-300gray-800
--vc-week-day-off-colorrose-500rose-500red-500
--vc-week-day-off-color-hoverrose-600rose-600red-600

Dates

Variablelightdarkslate-light
--vc-date-bgwhiteslate-900slate-100
--vc-date-colorslate-900slate-400gray-800
--vc-date-color-hover dark onlyslate-200
--vc-date-bg-hoverslate-100slate-800slate-200
--vc-date-hover-bgslate-100slate-800slate-200
--vc-date-hover-edge-bgslate-200slate-700slate-300
--vc-date-disabled-colorslate-300slate-700gray-400
--vc-date-outside-colorslate-400slate-600gray-400
--vc-date-today-bgslate-100slate-800slate-200
--vc-date-today-colorcyan-500cyan-500blue-500
--vc-date-today-outside-colorslate-500slate-600gray-600
--vc-date-selected-bgcyan-500cyan-500blue-500
--vc-date-selected-colorwhitewhitewhite
--vc-date-selected-outside-bgslate-300slate-700slate-300
--vc-date-selected-outside-colorslate-500slate-300gray-600

Weekends / holidays

Variablelightdarkslate-light
--vc-date-weekend-colorrose-500rose-500red-500
--vc-date-weekend-bg-hoverrose-50slate-800slate-200
--vc-date-weekend-hover-bgrose-50slate-800slate-200
--vc-date-weekend-hover-edge-bgrose-100slate-700slate-300
--vc-date-weekend-disabled-colorslate-300slate-700gray-400
--vc-date-weekend-today-colorrose-500rose-500red-500
--vc-date-weekend-today-disabled-colorslate-300slate-700gray-400
--vc-date-weekend-outside-bgwhiteslate-900slate-100
--vc-date-weekend-outside-colorslate-400slate-600gray-400
--vc-date-weekend-outside-color-hover dark onlyslate-300
--vc-date-weekend-outside-bg-hoverslate-100slate-800slate-200
--vc-date-weekend-outside-hover-bgslate-100slate-800slate-200
--vc-date-weekend-today-outside-colorslate-400slate-400gray-400
--vc-date-weekend-disabled-outside-colorslate-300slate-700gray-400
--vc-date-weekend-selected-bgrose-500rose-500red-500
--vc-date-weekend-selected-colorwhitewhitewhite

Selected ranges (multiple-ranged)

Variablelightdarkslate-light
--vc-date-range-middle-bgcyan-500 at 70%cyan-500 at 80%blue-500 at 80%
--vc-date-range-middle-colorwhitewhitewhite
--vc-date-range-middle-outside-bgslate-200slate-800slate-200
--vc-date-range-middle-outside-colorslate-500slate-300gray-600
--vc-date-range-middle-weekend-bgrose-500 at 70%rose-500 at 80%red-500 at 80%
--vc-date-range-middle-weekend-colorwhitewhitewhite

Popups & tooltip

Variablelightdarkslate-light
--vc-date-popup-bgwhiteslate-800white
--vc-date-popup-colorslate-900whitegray-800
--vc-date-range-tooltip-bgslate-50slate-800slate-50
--vc-date-range-tooltip-colorslate-500slate-400slate-500

Time controls

Variablelightdarkslate-light
--vc-time-border-colorslate-300slate-800gray-300
--vc-time-separator-colorslate-900whitegray-800
--vc-time-input-bgwhiteslate-900slate-100
--vc-time-input-colorslate-900whitegray-800
--vc-time-input-bg-hoverorange-100slate-700blue-100
--vc-time-keeping-colorslate-500slate-500gray-600
--vc-time-keeping-color-hover dark onlyslate-400
--vc-time-range-bgwhiteslate-900slate-100
--vc-time-range-track-colorslate-300slate-600slate-300
--vc-time-range-thumb-bgwhiteslate-800slate-100
--vc-time-range-thumb-borderslate-300slate-600gray-300
--vc-time-range-thumb-border-hoverslate-400slate-400gray-400

The three variables marked "dark only" exist because the dark theme has an extra hover state on those elements that the light/slate-light themes don't — there's nothing to override in the other themes for those specific variables.