---
title: "Calendar"
description: "Календарь для выбора одной даты, нескольких дат или диапазона."
canonical_url: "https://b24-ui.bx-shef.by/docs/components/calendar"
---
# Calendar

> Календарь для выбора одной даты, нескольких дат или диапазона.

## Использование

Выбранной датой управляет директива `v-model`.

```vue
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'

const value = shallowRef(new CalendarDate(undefined, undefined, undefined))
</script>

<template>
  <B24Calendar v-model="value" />
</template>
```

Пропс `default-value` задаёт начальное значение, если управлять состоянием не нужно.

```vue
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'

const defaultValue = shallowRef(new CalendarDate(undefined, undefined, undefined))
</script>

<template>
  <B24Calendar :default-value="defaultValue" />
</template>
```

**Nuxt:**

> [!NOTE]
> See: /docs/getting-started/integrations/i18n/nuxt/#locale
> Для форматирования с учётом локали компонент использует пакет `@internationalized/date`. Формат даты определяет пропс `locale` компонента App.

**Vue:**

> [!NOTE]
> See: /docs/getting-started/integrations/i18n/vue/#locale
> Для форматирования с учётом локали компонент использует пакет `@internationalized/date`. Формат даты определяет пропс `locale` компонента App.

### Тип `2.14+`

Пропс `type` меняет то, что выбирается в календаре. По умолчанию — `date`.

При `date` щелчок по заголовку переключает вид дней на вид месяцев, а затем лет — так удобно быстро перейти к нужному периоду; потом вы возвращаетесь к выбору дня.

```vue
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'

const value = shallowRef(new CalendarDate(undefined, undefined, undefined))
</script>

<template>
  <B24Calendar type="month" v-model="value" />
</template>
```

`type="year"` отрисовывает отдельный выбор года.

```vue
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'

const value = shallowRef(new CalendarDate(undefined, undefined, undefined))
</script>

<template>
  <B24Calendar type="year" v-model="value" />
</template>
```

### Множественный выбор

Пропс `multiple` разрешает выбрать несколько дат.

```vue
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'

const value = shallowRef([new CalendarDate(undefined, undefined, undefined), new CalendarDate(undefined, undefined, undefined), new CalendarDate(undefined, undefined, undefined)])
</script>

<template>
  <B24Calendar multiple v-model="value" />
</template>
```

### Локаль

Пропс `locale` меняет локаль календаря.

```vue
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'

const value = shallowRef(new CalendarDate(undefined, undefined, undefined))
</script>

<template>
  <B24Calendar v-model="value" locale="zh-CN" />
</template>
```

### Диапазон

Пропс `range` включает выбор диапазона дат.

```vue
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'

const value = shallowRef({ start: new CalendarDate(undefined, undefined, undefined), end: new CalendarDate(undefined, undefined, undefined) })
</script>

<template>
  <B24Calendar range v-model="value" />
</template>
```

Пропс `range` работает и с `type="month"` и `type="year"` — можно выбрать диапазон месяцев или лет.

```vue
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'

const value = shallowRef({ start: new CalendarDate(undefined, undefined, undefined), end: new CalendarDate(undefined, undefined, undefined) })
</script>

<template>
  <B24Calendar type="month" range v-model="value" />
</template>
```

### Число месяцев

Пропс `numberOfMonths` меняет число месяцев в календаре.

```vue
<template>
  <B24Calendar :number-of-months="3" />
</template>
```

### Управление месяцами

Пропс `month-controls` показывает кнопки переключения месяцев. По умолчанию — `true`.

```vue
<template>
  <B24Calendar :month-controls="false" />
</template>
```

Пропсы `prev-month` и `next-month` переопределяют кнопки месяцев.

```vue
<template>
  <B24Calendar :prev-month="{color:'air-primary'}" :next-month="{color:'air-primary-alert'}" />
</template>
```

### Управление годами

Пропс `year-controls` показывает кнопки переключения годов. По умолчанию — `true`.

```vue
<template>
  <B24Calendar :year-controls="false" />
</template>
```

Пропсы `prev-year` и `next-year` переопределяют кнопки годов.

```vue
<template>
  <B24Calendar :prev-year="{color:'air-primary'}" :next-year="{color:'air-primary'}" />
</template>
```

### Переключение вида `2.14+`

Пропс `view-control` превращает заголовок в кнопку, которая переключает виды дней, месяцев и лет. По умолчанию — `true`.

```vue
<template>
  <B24Calendar :view-control="false" />
</template>
```

Если передать в `view-control` объект, он переопределит кнопку заголовка.

```vue
<template>
  <B24Calendar :view-control="{color:'air-primary'}" />
</template>
```

### Годов на странице `2.15+`

Пропс `years-per-page` меняет число лет в виде годов. По умолчанию — `12`.

```vue
<template>
  <B24Calendar type="year" :years-per-page="20" />
</template>
```

### Фиксированные недели

Пропс `fixed-weeks` показывает календарь с фиксированным числом недель.

```vue
<template>
  <B24Calendar :fixed-weeks="false" />
</template>
```

### Номера недель

Пропс `week-numbers` показывает номера недель.

```vue
<template>
  <B24Calendar week-numbers />
</template>
```

### Цвет

Пропс `color` меняет цвет календаря.

```vue
<template>
  <B24Calendar color="air-primary-alert" />
</template>
```

### Размер

Пропс `size` меняет размер календаря.

```vue
<template>
  <B24Calendar size="lg" />
</template>
```

### Отключение

Пропс `disabled` отключает календарь.

```vue
<template>
  <B24Calendar disabled />
</template>
```

## Примеры

### С событиями в чипах

Компонент [Chip](https://b24-ui.bx-shef.by/raw/docs/components/chip.md) добавляет события к отдельным дням.

```vue [CalendarEventsExample.vue]
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'

const modelValue = shallowRef(new CalendarDate(2012, 4, 12))

function getColorByDate(date: Date) {
  const isWeekend = date.getUTCDay() % 6 == 0
  const isDayMeeting = date.getUTCDay() % 3 == 0

  if (isWeekend) {
    return undefined
  }

  if (isDayMeeting) {
    return 'air-primary-alert'
  }

  return 'air-primary-success'
}
</script>

<template>
  <B24Calendar v-model="modelValue" size="lg">
    <template #day="{ day }">
      <B24Chip
        :show="!!getColorByDate(day.toDate('UTC'))"
        :color="getColorByDate(day.toDate('UTC'))"
        size="sm"
      >
        {{ day.day }}
      </B24Chip>
    </template>
  </B24Calendar>
</template>
```

### С отключёнными датами

Пропс `is-date-disabled` с функцией помечает отдельные даты как отключённые. При `type="month"` или `type="year"` используйте `is-month-disabled` или `is-year-disabled`.

```vue [CalendarDisabledDatesExample.vue]
<script setup lang="ts">
import type { DateValue } from '@internationalized/date'
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'

const modelValue = shallowRef({
  start: new CalendarDate(2012, 4, 12),
  end: new CalendarDate(2012, 4, 14)
})

const isDateDisabled = (date: DateValue) => {
  return date.day >= 15 && date.day <= 17
}
</script>

<template>
  <B24Calendar v-model="modelValue" :is-date-disabled="isDateDisabled" range />
</template>
```

### С недоступными датами

Пропс `is-date-unavailable` с функцией помечает отдельные даты как недоступные. При `type="month"` или `type="year"` используйте `is-month-unavailable` или `is-year-unavailable`.

```vue [CalendarUnavailableDatesExample.vue]
<script setup lang="ts">
import type { DateValue } from '@internationalized/date'
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'

const modelValue = shallowRef({
  start: new CalendarDate(2012, 4, 12),
  end: new CalendarDate(2012, 4, 14)
})

const isDateUnavailable = (date: DateValue) => {
  return date.day >= 15 && date.day <= 17
}
</script>

<template>
  <B24Calendar v-model="modelValue" :is-date-unavailable="isDateUnavailable" range />
</template>
```

### С минимальной и максимальной датой

Пропсы `min-value` и `max-value` ограничивают диапазон дат.

```vue [CalendarMinMaxDatesExample.vue]
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'

const modelValue = shallowRef(new CalendarDate(2012, 4, 12))
const minDate = new CalendarDate(2012, 4, 3)
const maxDate = new CalendarDate(2012, 4, 27)
</script>

<template>
  <B24Calendar v-model="modelValue" :min-value="minDate" :max-value="maxDate" />
</template>
```

### С другими календарными системами

Другие календари из `@internationalized/date` дают другую календарную систему.

```vue [CalendarOtherSystemExample.vue]
<script lang="ts" setup>
import { shallowRef } from 'vue'
import { CalendarDate, HebrewCalendar } from '@internationalized/date'

const hebrewDate = shallowRef(new CalendarDate(new HebrewCalendar(), 5781, 1, 1))
</script>

<template>
  <B24Calendar v-model="hebrewDate" />
</template>
```

> [!NOTE]
> See: https://react-spectrum.adobe.com/internationalized/date/Calendar.html#implementations
> Все доступные календари перечислены в документации `@internationalized/date`.

### С внешним управлением

Календарём можно управлять извне, меняя дату в `v-model`.

```vue [CalendarExternalControlsExample.vue]
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'

const date = shallowRef(new CalendarDate(2012, 4, 12))
</script>

<template>
  <div class="flex flex-col gap-4">
    <B24Calendar v-model="date" :month-controls="false" :year-controls="false" />

    <div class="flex justify-between gap-4">
      <B24Button @click="date = date.subtract({ months: 1 })">
        Назад
      </B24Button>

      <B24Button @click="date = date.add({ months: 1 })">
        Вперёд
      </B24Button>
    </div>
  </div>
</template>
```

### С сегодняшней датой

Функция `today` из `@internationalized/date` вместе с `getLocalTimeZone` задаёт текущую дату.

```vue [CalendarTodayExample.vue]
<script setup lang="ts">
import { getLocalTimeZone, today } from '@internationalized/date'

const date = shallowRef(today(getLocalTimeZone()))
</script>

<template>
  <div class="flex flex-col gap-4">
    <B24Calendar v-model="date" />

    <B24Button color="air-primary" class="justify-center" @click="date = today(getLocalTimeZone())">
      Сегодня
    </B24Button>
  </div>
</template>
```

### Как выбор даты

Из [Button](https://b24-ui.bx-shef.by/raw/docs/components/button.md) и [Popover](https://b24-ui.bx-shef.by/raw/docs/components/popover.md) собирается выбор даты.

```vue [CalendarDatePickerExample.vue]
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate, DateFormatter, getLocalTimeZone } from '@internationalized/date'
import Calendar1Icon from '@bitrix24/b24icons-vue/main/Calendar1Icon'

const df = new DateFormatter('en-US', {
  dateStyle: 'medium'
})

const modelValue = shallowRef(new CalendarDate(2012, 4, 12))
</script>

<template>
  <B24Popover>
    <B24Button :icon="Calendar1Icon">
      {{ modelValue ? df.format(modelValue.toDate(getLocalTimeZone())) : 'Выберите дату' }}
    </B24Button>

    <template #content>
      <B24Calendar v-model="modelValue" class="p-2" />
    </template>
  </B24Popover>
</template>
```

### Как выбор диапазона дат

Из [Button](https://b24-ui.bx-shef.by/raw/docs/components/button.md) и [Popover](https://b24-ui.bx-shef.by/raw/docs/components/popover.md) собирается выбор диапазона дат с готовыми диапазонами.

```vue [CalendarDateRangePickerExample.vue]
<script setup lang="ts">
import { shallowRef } from 'vue'
import { DateFormatter, getLocalTimeZone, today } from '@internationalized/date'
import Calendar1Icon from '@bitrix24/b24icons-vue/main/Calendar1Icon'

const { screen } = useDevice()
const df = new DateFormatter('en-US', { dateStyle: 'medium' })
const tz = getLocalTimeZone()

const ranges = [
  { label: 'Последние 7 дней', days: 7 },
  { label: 'Последние 14 дней', days: 14 },
  { label: 'Последние 30 дней', days: 30 },
  { label: 'Последние 3 месяца', months: 3 },
  { label: 'Последние 6 месяцев', months: 6 },
  { label: 'Последний год', years: 1 }
]

const initialEnd = today(tz)
const modelValue = shallowRef({
  start: initialEnd.subtract({ days: 14 }),
  end: initialEnd
})

const label = computed(() => {
  const { start, end } = modelValue.value
  if (!start) return 'Выберите дату'
  if (!end) return df.format(start.toDate(tz))
  return `${df.format(start.toDate(tz))} - ${df.format(end.toDate(tz))}`
})

function computeStart(range: typeof ranges[number]) {
  const end = today(tz)
  return { start: end.subtract({ days: range.days, months: range.months, years: range.years }), end }
}

function isRangeSelected(range: typeof ranges[number]) {
  if (!modelValue.value?.start || !modelValue.value?.end) return false
  const { start, end } = computeStart(range)
  return modelValue.value.start.compare(start) === 0 && modelValue.value.end.compare(end) === 0
}

function selectRange(range: typeof ranges[number]) {
  modelValue.value = computeStart(range)
}
</script>

<template>
  <B24Popover :content="{ align: 'center' }">
    <B24Button :icon="Calendar1Icon">
      {{ label }}
    </B24Button>

    <template #content>
      <div class="flex items-stretch divide-x divide-accented">
        <div class="hidden sm:flex flex-col justify-center py-2">
          <B24Button
            v-for="(range, index) in ranges"
            :key="index"
            :label="range.label"
            class="rounded-none px-4"
            :class="[isRangeSelected(range) ? 'bg-elevated' : 'hover:bg-elevated/50']"
            truncate
            @click="selectRange(range)"
          />
        </div>

        <B24Calendar v-model="modelValue" class="p-2" :number-of-months="screen.isDesktop ? 2 : 1" range />
      </div>
    </template>
  </B24Popover>
</template>
```

## API

### Пропсы

```ts
/**
 * Props for the Calendar component
 */
interface CalendarProps {
  /**
   * The element or component this component should render as.
   * @default 'div'
   */
  as?: any;
  /**
   * The type of picker.
   * - `date` renders a day calendar whose heading can switch to a month then year view.
   * - `month` renders a standalone month picker.
   * - `year` renders a standalone year picker.
   * @default 'date'
   */
  type?: "date" | "month" | "year" | undefined;
  /**
   * The icon to use for the next year control.
   * @default icons.chevronDoubleRight
   */
  nextYearIcon?: (props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Attrs; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, "expose">): any | undefined;
  /**
   * Configure the next year button.
   * `{ color: 'air-tertiary' }`
   */
  nextYear?: Omit<ButtonProps, LinkPropsKeys> | undefined;
  /**
   * The icon to use for the next month control.
   * @default icons.chevronRight
   */
  nextMonthIcon?: (props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Attrs; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, "expose">): any | undefined;
  /**
   * Configure the next month button.
   * `{ color: 'air-tertiary' }`
   */
  nextMonth?: Omit<ButtonProps, LinkPropsKeys> | undefined;
  /**
   * The icon to use for the previous year control.
   * @default icons.chevronDoubleLeft
   */
  prevYearIcon?: (props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Attrs; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, "expose">): any | undefined;
  /**
   * Configure the prev year button.
   * `{ color: 'air-tertiary' }`
   */
  prevYear?: Omit<ButtonProps, LinkPropsKeys> | undefined;
  /**
   * The icon to use for the previous month control.
   * @default icons.chevronLeft
   */
  prevMonthIcon?: (props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Attrs; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, "expose">): any | undefined;
  /**
   * Configure the prev month button.
   * `{ color: 'air-tertiary' }`
   */
  prevMonth?: Omit<ButtonProps, LinkPropsKeys> | undefined;
  /**
   * Whether to make the heading a button that switches between the day, month and year views.
   * Has no effect when `type` is `year`. Can be an object to override the button props.
   * `{ color: 'air-tertiary', block: true }`
   * @default true
   */
  viewControl?: boolean | Omit<ButtonProps, LinkPropsKeys> | undefined;
  /**
   * @default 'air-primary'
   */
  color?: "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-warning" | "air-primary-copilot";
  /**
   * @default 'md'
   */
  size?: "xs" | "sm" | "md" | "lg" | undefined;
  /**
   * Whether or not a range of dates can be selected
   */
  range?: R | undefined;
  /**
   * Whether or not multiple dates can be selected
   */
  multiple?: M | undefined;
  /**
   * Show month controls
   * @default true
   */
  monthControls?: boolean | undefined;
  /**
   * Show year controls
   * @default true
   */
  yearControls?: boolean | undefined;
  defaultValue?: CalendarDate | CalendarDateTime | ZonedDateTime | DateRange | DateValue[];
  modelValue?: null | CalendarDate | CalendarDateTime | ZonedDateTime | DateRange | DateValue[];
  weekNumbers?: boolean | undefined;
  b24ui?: { root?: SlotClass; header?: SlotClass; body?: SlotClass; heading?: SlotClass; headingLabel?: SlotClass; grid?: SlotClass; gridRow?: SlotClass; gridWeekDaysRow?: SlotClass; gridBody?: SlotClass; headCell?: SlotClass; headCellWeek?: SlotClass; cell?: SlotClass; cellTrigger?: SlotClass; cellWeek?: SlotClass; } | undefined;
  defaultPlaceholder?: CalendarDate | CalendarDateTime | ZonedDateTime;
  placeholder?: CalendarDate | CalendarDateTime | ZonedDateTime;
  /**
   * When combined with `isDateUnavailable`, determines whether non-contiguous ranges, i.e. ranges containing unavailable dates, may be selected.
   */
  allowNonContiguousRanges?: boolean | undefined;
  /**
   * This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month
   */
  pagedNavigation?: boolean | undefined;
  /**
   * Whether or not to prevent the user from deselecting a date without selecting another date first
   */
  preventDeselect?: boolean | undefined;
  /**
   * The maximum number of days that can be selected in a range
   */
  maximumDays?: number | undefined;
  /**
   * The day of the week to start the calendar on
   */
  weekStartsOn?: 0 | 1 | 2 | 4 | 3 | 5 | 6 | undefined;
  /**
   * The format to use for the weekday strings provided via the weekdays slot prop
   */
  weekdayFormat?: "narrow" | "short" | "long" | undefined;
  /**
   * Whether or not to always display 6 weeks in the calendar
   * @default true
   */
  fixedWeeks?: boolean | undefined;
  maxValue?: CalendarDate | CalendarDateTime | ZonedDateTime;
  minValue?: CalendarDate | CalendarDateTime | ZonedDateTime;
  /**
   * The locale to use for formatting dates
   */
  locale?: string | undefined;
  /**
   * The number of months to display at once
   */
  numberOfMonths?: number | undefined;
  /**
   * Whether or not the calendar is disabled
   */
  disabled?: boolean | undefined;
  /**
   * Whether or not the calendar is readonly
   */
  readonly?: boolean | undefined;
  /**
   * If true, the calendar will focus the selected day, today, or the first day of the month depending on what is visible when the calendar is mounted
   */
  initialFocus?: boolean | undefined;
  /**
   * A function that returns whether or not a date is disabled
   */
  isDateDisabled?: (date: DateValue): boolean | undefined;
  /**
   * A function that returns whether or not a date is unavailable
   */
  isDateUnavailable?: (date: DateValue): boolean | undefined;
  /**
   * A function that returns whether or not a date is hightable
   */
  isDateHighlightable?: (date: DateValue): boolean | undefined;
  /**
   * A function that returns the next page of the calendar. It receives the current placeholder as an argument inside the component.
   */
  nextPage?: (placeholder: DateValue): DateValue | undefined;
  /**
   * A function that returns the previous page of the calendar. It receives the current placeholder as an argument inside the component.
   */
  prevPage?: (placeholder: DateValue): DateValue | undefined;
  /**
   * Whether or not to disable days outside the current view.
   */
  disableDaysOutsideCurrentView?: boolean | undefined;
  /**
   * Which part of the range should be fixed
   */
  fixedDate?: "start" | "end" | undefined;
  /**
   * A function that returns whether or not a month is disabled
   */
  isMonthDisabled?: (date: DateValue): boolean | undefined;
  /**
   * A function that returns whether or not a month is unavailable
   */
  isMonthUnavailable?: (date: DateValue): boolean | undefined;
  /**
   * A function that returns whether or not a year is disabled
   */
  isYearDisabled?: (date: DateValue): boolean | undefined;
  /**
   * A function that returns whether or not a year is unavailable
   */
  isYearUnavailable?: (date: DateValue): boolean | undefined;
  /**
   * Number of years to display per page
   */
  yearsPerPage?: number | undefined;
}
```

### Слоты

```ts
/**
 * Slots for the Calendar component
 */
interface CalendarSlots {
  heading(): any;
  day(): any;
  week-day(): any;
  month-cell(): any;
  year-cell(): any;
}
```

### События

```ts
/**
 * Emitted events for the Calendar component
 */
interface CalendarEmits {
  update:modelValue: (payload: [value: CalendarModelValue<R, M>]) => void;
  update:placeholder: (payload: [date: DateValue]) => void;
  update:validModelValue: (payload: [date: DateRange]) => void;
  update:startValue: (payload: [date: DateValue | undefined]) => void;
}
```

## Тема

```ts [app.config.ts]
export default defineAppConfig({
  b24ui: {
    calendar: {
      slots: {
        root: 'font-[family-name:var(--ui-font-family-primary)]',
        header: 'flex items-center justify-between',
        body: 'flex flex-col space-y-4 pt-4 sm:flex-row sm:space-x-4 sm:space-y-0',
        heading: 'flex-1 min-w-0 text-center',
        headingLabel: 'text-legend font-(--ui-font-weight-semi-bold) block truncate p-1.5',
        grid: 'w-full border-collapse select-none space-y-1 focus:outline-none',
        gridRow: 'grid',
        gridWeekDaysRow: 'mb-1 grid w-full grid-cols-7',
        gridBody: 'grid',
        headCell: 'font-(--ui-font-weight-normal) text-(--ui-color-design-plain-na-content-secondary)',
        headCellWeek: 'text-(--ui-color-design-plain-na-content-secondary)',
        cell: 'relative text-center cursor-pointer aria-disabled:cursor-not-allowed',
        cellTrigger: 'm-0 sm:m-0.5 relative flex items-center justify-center whitespace-nowrap focus-visible:ring-2 focus:outline-none text-label data-[disabled]:text-(--ui-color-design-plain-na-content-secondary) data-disabled:opacity-30 data-unavailable:text-(--ui-color-design-plain-na-content-secondary) data-selected:text-(--b24ui-color) focus-visible:ring-(--b24ui-background-hover) data-selected:focus-visible:ring-(--b24ui-background-hover) data-selected:bg-(--b24ui-background) data-today:not-data-selected:text-(--b24ui-background) data-highlighted:bg-(--b24ui-background) data-highlighted:text-(--b24ui-color) hover:not-data-[disabled]:not-data-[selected]:bg-(--b24ui-background) hover:not-data-[disabled]:not-data-[selected]:text-(--b24ui-color) data-unavailable:line-through data-unavailable:pointer-events-none data-today:font-(--ui-font-weight-semi-bold) transition',
        cellWeek: 'relative text-center text-(--ui-color-design-plain-na-content-secondary)'
      },
      variants: {
        color: {
          'air-primary': {
            root: 'style-filled'
          },
          'air-primary-success': {
            root: 'style-filled-success'
          },
          'air-primary-alert': {
            root: 'style-filled-alert'
          },
          'air-primary-copilot': {
            root: 'style-filled-copilot'
          },
          'air-primary-warning': {
            root: 'style-filled-warning'
          },
          default: {
            root: 'style-old-default'
          },
          danger: {
            root: 'style-old-danger'
          },
          success: {
            root: 'style-old-success'
          },
          warning: {
            root: 'style-old-warning'
          },
          primary: {
            root: 'style-old-primary'
          },
          secondary: {
            root: 'style-old-secondary'
          },
          collab: {
            root: 'style-old-collab'
          },
          ai: {
            root: 'style-old-ai'
          }
        },
        size: {
          xs: {
            headingLabel: 'text-(length:--ui-font-size-md)',
            cell: 'text-(length:--ui-font-size-sm)',
            cellWeek: 'text-(length:--ui-font-size-4xs)',
            headCell: 'text-(length:--ui-font-size-4xs)',
            headCellWeek: 'text-(length:--ui-font-size-4xs)',
            body: 'space-y-2 pt-2'
          },
          sm: {
            headingLabel: 'text-(length:--ui-font-size-md)',
            headCell: 'text-(length:--ui-font-size-3xs)',
            headCellWeek: 'text-(length:--ui-font-size-3xs)',
            cellWeek: 'text-(length:--ui-font-size-3xs)',
            cell: 'text-(length:--ui-font-size-sm)'
          },
          md: {
            headingLabel: 'text-(length:--ui-font-size-lg)',
            headCell: 'text-(length:--ui-font-size-xs)',
            headCellWeek: 'text-(length:--ui-font-size-xs)',
            cellWeek: 'text-(length:--ui-font-size-xs)',
            cell: 'text-(length:--ui-font-size-md)'
          },
          lg: {
            headingLabel: 'text-(length:--ui-font-size-2xl)',
            headCell: 'text-(length:--ui-font-size-xs)',
            headCellWeek: 'text-(length:--ui-font-size-xs)',
            cellWeek: 'text-(length:--ui-font-size-xs)',
            cell: 'text-(length:--ui-font-size-lg)'
          }
        },
        view: {
          day: {
            gridRow: 'grid-cols-7 place-items-center',
            cellTrigger: 'rounded-full data-outside-view:text-(--ui-color-design-plain-na-content-secondary)'
          },
          month: {
            gridRow: 'grid-cols-4',
            cellTrigger: 'rounded-md'
          },
          year: {
            gridRow: 'grid-cols-4',
            cellTrigger: 'rounded-md'
          }
        },
        weekNumbers: {
          true: ''
        }
      },
      compoundVariants: [
        {
          size: 'xs',
          view: 'day',
          class: {
            cellTrigger: 'size-11 sm:size-6'
          }
        },
        {
          size: 'sm',
          view: 'day',
          class: {
            cellTrigger: 'size-11 sm:size-7'
          }
        },
        {
          size: 'md',
          view: 'day',
          class: {
            cellTrigger: 'size-11 sm:size-8'
          }
        },
        {
          size: 'lg',
          view: 'day',
          class: {
            cellTrigger: 'size-11 sm:size-9'
          }
        },
        {
          size: 'xs',
          view: [
            'month',
            'year'
          ],
          class: {
            cellTrigger: 'h-11 sm:h-6 px-2'
          }
        },
        {
          size: 'sm',
          view: [
            'month',
            'year'
          ],
          class: {
            cellTrigger: 'h-11 sm:h-7 px-2'
          }
        },
        {
          size: 'md',
          view: [
            'month',
            'year'
          ],
          class: {
            cellTrigger: 'h-11 sm:h-8 px-3'
          }
        },
        {
          size: 'lg',
          view: [
            'month',
            'year'
          ],
          class: {
            cellTrigger: 'h-11 sm:h-9 px-4'
          }
        },
        {
          view: 'day',
          weekNumbers: true,
          class: {
            gridRow: 'grid-cols-8',
            gridWeekDaysRow: 'grid-cols-8 [&>*:first-child]:col-start-2'
          }
        }
      ],
      defaultVariants: {
        size: 'md',
        color: 'air-primary',
        view: 'day'
      }
    }
  }
})
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
