Usage
Use the v-model directive to control the selected date.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const value = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar v-model="value" />
</template>
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'
const value = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar v-model="value" />
</template>
Use the default-value prop to set the initial value when you do not need to control its state.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const defaultValue = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar :default-value="defaultValue" />
</template>
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'
const defaultValue = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar :default-value="defaultValue" />
</template>
@internationalized/date package for locale-aware formatting. The date format is determined by the locale prop of the App component.@internationalized/date package for locale-aware formatting. The date format is determined by the locale prop of the App component.Type Soon
Use the type prop to change what the calendar selects. Defaults to date.
When using date, click the heading to switch from the day view to a month then year view for quick navigation, then drill back down to pick a date.
Jan | Feb | Mar | Apr |
May | Jun | Jul | Aug |
Sep | Oct | Nov | Dec |
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const value = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar type="month" v-model="value" />
</template>
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'
const value = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar type="month" v-model="value" />
</template>
Use type="year" to render a standalone year picker.
2010 | 2011 | 2012 | 2013 |
2014 | 2015 | 2016 | 2017 |
2018 | 2019 | 2020 | 2021 |
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const value = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar type="year" v-model="value" />
</template>
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'
const value = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar type="year" v-model="value" />
</template>
Multiple
Use the multiple prop to allow multiple selections.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const value = shallowRef([
new CalendarDate(2012, 4, 4),
new CalendarDate(2012, 4, 12),
new CalendarDate(2012, 4, 20)
])
</script>
<template>
<B24Calendar multiple v-model="value" />
</template>
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'
const value = shallowRef([
new CalendarDate(2012, 4, 4),
new CalendarDate(2012, 4, 12),
new CalendarDate(2012, 4, 20)
])
</script>
<template>
<B24Calendar multiple v-model="value" />
</template>
Locale
Use the locale prop to change the locale of the calendar.
| 一 | 二 | 三 | 四 | 五 | 六 | 日 |
|---|---|---|---|---|---|---|
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 1 | 2 | 3 | 4 | 5 | 6 |
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const value = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar v-model="value" locale="zh-CN" />
</template>
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'
const value = shallowRef(new CalendarDate(2012, 4, 12))
</script>
<template>
<B24Calendar v-model="value" locale="zh-CN" />
</template>
Range
Use the range prop to select a range of dates.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const value = shallowRef({
start: new CalendarDate(2012, 4, 3),
end: new CalendarDate(2012, 4, 20)
})
</script>
<template>
<B24Calendar range v-model="value" />
</template>
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'
const value = shallowRef({
start: new CalendarDate(2012, 4, 3),
end: new CalendarDate(2012, 4, 20)
})
</script>
<template>
<B24Calendar range v-model="value" />
</template>
The range prop also works with type="month" and type="year", letting you select a range of months or years.
Jan | Feb | Mar | Apr |
May | Jun | Jul | Aug |
Sep | Oct | Nov | Dec |
<script setup lang="ts">
import { CalendarDate } from '@internationalized/date'
const value = shallowRef({
start: new CalendarDate(2012, 4, 3),
end: new CalendarDate(2012, 4, 20)
})
</script>
<template>
<B24Calendar type="month" range v-model="value" />
</template>
<script setup lang="ts">
import { shallowRef } from 'vue'
import { CalendarDate } from '@internationalized/date'
const value = shallowRef({
start: new CalendarDate(2012, 4, 3),
end: new CalendarDate(2012, 4, 20)
})
</script>
<template>
<B24Calendar type="month" range v-model="value" />
</template>
Number Of Months
Use the numberOfMonths prop to change the number of months in the calendar.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
30 | 31 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
<template>
<B24Calendar :number-of-months="3" />
</template>
Month Controls
Use the month-controls prop to show the month controls. Defaults to true.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar :month-controls="false" />
</template>
Use the prev-month and next-month props to override the month buttons.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar
:prev-month="{
color: 'air-primary'
}"
:next-month="{
color: 'air-primary-alert'
}"
/>
</template>
Year Controls
Use the year-controls prop to show the year controls. Defaults to true.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar :year-controls="false" />
</template>
Use the prev-year and next-year props to override the year buttons.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar
:prev-year="{
color: 'air-primary'
}"
:next-year="{
color: 'air-primary'
}"
/>
</template>
View Control Soon
Use the view-control prop to make the heading a button that switches between the day, month and year views. Defaults to true.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar :view-control="false" />
</template>
Set the view-control prop to an object to override the heading button.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar
:view-control="{
color: 'air-primary'
}"
/>
</template>
Fixed Weeks
Use the fixed-weeks prop to display the calendar with fixed weeks.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
<template>
<B24Calendar :fixed-weeks="false" />
</template>
Week Numbers
Use the week-numbers prop to display week numbers in the calendar.
| S | M | T | W | T | F | S | |
|---|---|---|---|---|---|---|---|
| 27 | 28 | 29 | 30 | 1 | 2 | 3 | 4 |
| 28 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 29 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 30 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 31 | 26 | 27 | 28 | 29 | 30 | 31 | 1 |
| 32 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar week-numbers />
</template>
Color
Use the color prop to change the color of the calendar.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
<template>
<B24Calendar color="air-primary-alert" />
</template>
Size
Use the size prop to change the size of the calendar.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar size="lg" />
</template>
Disabled
Use the disabled prop to disable the calendar.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
<template>
<B24Calendar disabled />
</template>
Examples
With chip events
Use the Chip component to add events to specific days.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
With disabled dates
Use the is-date-disabled prop with a function to mark specific dates as disabled. When using type="month" or type="year", use the is-month-disabled or is-year-disabled prop instead.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
With unavailable dates
Use the is-date-unavailable prop with a function to mark specific dates as unavailable. When using type="month" or type="year", use the is-month-unavailable or is-year-unavailable prop instead.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
With min/max dates
Use the min-value and max-value props to limit the dates.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
With other calendar systems
You can use other calenders from @internationalized/date to implement a different calendar system.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
24 | 25 | 26 | 27 | 28 | 29 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 1 | 2 | 3 | 4 | 5 | 6 |
With external controls
You can control the calendar with external controls by manipulating the date passed in the v-model.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
With today's date
Use the today function from @internationalized/date with getLocalTimeZone to set the value to the current date.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
28 | 29 | 30 | 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
As a date picker
Use a Button and a Popover component to create a date picker.
As a date range picker
Use a Button and a Popover component to create a date range picker with preset ranges.
API
Props
Slots
Emits
Theme
export default {
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.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-7'
}
},
{
size: 'sm',
view: 'day',
class: {
cellTrigger: 'size-7'
}
},
{
size: 'md',
view: 'day',
class: {
cellTrigger: 'size-8'
}
},
{
size: 'lg',
view: 'day',
class: {
cellTrigger: 'size-9 text-(length:--ui-font-size-lg)'
}
},
{
size: 'xs',
view: [
'month',
'year'
],
class: {
cellTrigger: 'h-7 px-2'
}
},
{
size: 'sm',
view: [
'month',
'year'
],
class: {
cellTrigger: 'h-7 px-2'
}
},
{
size: 'md',
view: [
'month',
'year'
],
class: {
cellTrigger: 'h-8 px-3'
}
},
{
size: 'lg',
view: [
'month',
'year'
],
class: {
cellTrigger: 'h-9 px-4 text-md'
}
},
{
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'
}
}