Calendar
Generated from public Vue/TypeScript exports by
pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commitfc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.
Calendar
import { Calendar } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
defaultValue | DateValue | undefined | — | The default value for the calendar |
defaultPlaceholder | DateValue | undefined | — | The default placeholder date |
placeholder | DateValue | undefined | — | The placeholder date, which is used to determine what month to display when no date is selected |
pagedNavigation | boolean | undefined | — | This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month |
preventDeselect | boolean | undefined | — | Whether or not to prevent the user from deselecting a date without selecting another date first |
weekStartsOn | WeekStartsOn | undefined | — | The day of the week to start the calendar on |
weekdayFormat | WeekDayFormat | undefined | — | The format to use for the weekday strings provided via the weekdays slot prop |
calendarLabel | string | undefined | — | The accessible label for the calendar |
fixedWeeks | boolean | undefined | — | Whether or not to always display 6 weeks in the calendar |
maxValue | DateValue | undefined | — | The maximum date that can be selected |
minValue | DateValue | undefined | — | The minimum date that can be selected |
locale | string | undefined | — | The locale to use for formatting dates |
numberOfMonths | number | undefined | — | The number of months to display at once |
disabled | boolean | undefined | — | Whether the calendar is disabled |
readonly | boolean | undefined | — | Whether the calendar is readonly |
initialFocus | 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 |
isDateDisabled | Matcher | undefined | — | A function that returns whether or not a date is disabled |
isDateUnavailable | Matcher | undefined | — | A function that returns whether or not a date is unavailable |
dir | Direction | undefined | — | The reading direction of the calendar when applicable. <br> If omitted, inherits globally from ConfigProvider or assumes LTR (left-to-right) reading mode. |
nextPage | ((placeholder: DateValue) => DateValue) | undefined | — | A function that returns the next page of the calendar. It receives the current placeholder as an argument inside the component. |
prevPage | ((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. |
modelValue | DateValue | DateValue[] | null | undefined | — | The controlled selected date value of the calendar. Can be bound as v-model. |
multiple | boolean | undefined | — | Whether multiple dates can be selected |
disableDaysOutsideCurrentView | boolean | undefined | — | Whether or not to disable days outside the current view. |
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | — | The element or component this component should render as. Can be overwritten by asChild. |
Events
| Name | Type | Required / default | Description |
|---|---|---|---|
update:modelValue | [date: DateValue | undefined] | — | — |
update:placeholder | [date: DateValue] | — | — |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | { grid: CalendarMonthGrid[]; weekDays: string[]; } | — | — |
Examples
These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Default
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ref } from 'vue'
import { Calendar } from '.'
import { CalendarDate } from '@internationalized/date'
{
render: () => ({
components: { Calendar },
template: `
<Calendar class="rounded-md border" />
`,
}),
}
WithSelectedDate
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ref } from 'vue'
import { Calendar } from '.'
import { CalendarDate } from '@internationalized/date'
{
name: 'With Selected Date',
render: () => ({
components: { Calendar },
setup() {
const value = ref(new CalendarDate(2025, 1, 15))
return { value }
},
template: `
<Calendar v-model="value" class="rounded-md border" />
`,
}),
}
Showcase
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ref } from 'vue'
import { Calendar } from '.'
import { CalendarDate } from '@internationalized/date'
{
name: 'Showcase',
render: () => ({
components: { Calendar },
setup() {
const selectedDate = ref(new CalendarDate(2025, 6, 10))
return { selectedDate }
},
template: `
<div class="space-y-8">
<div>
<h3 class="text-lg font-semibold mb-4 text-white">Default Calendar</h3>
<Calendar class="rounded-md border" />
</div>
<div>
<h3 class="text-lg font-semibold mb-4 text-white">With Pre-selected Date</h3>
<Calendar v-model="selectedDate" class="rounded-md border" />
</div>
<div>
<h3 class="text-lg font-semibold mb-4 text-white">Fixed Weeks</h3>
<Calendar :fixed-weeks="true" class="rounded-md border" />
</div>
</div>
`,
}),
}
CalendarCell
import { CalendarCell } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
date | DateValue | Required | The date value for the cell |
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | — | The element or component this component should render as. Can be overwritten by asChild. |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | {} | — | — |
Examples
These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Composition
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from './index'
{ render: () => ({ components: { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton }, template: `<Calendar v-slot="{ grid, weekDays }" class="rounded-lg border">
<CalendarHeader><CalendarPrevButton /><CalendarHeading /><CalendarNextButton /></CalendarHeader>
<CalendarGrid v-for="month in grid" :key="month.value.toString()"><CalendarGridHead><CalendarGridRow><CalendarHeadCell v-for="day in weekDays" :key="day">{{ day }}</CalendarHeadCell></CalendarGridRow></CalendarGridHead><CalendarGridBody><CalendarGridRow v-for="(week, index) in month.rows" :key="index"><CalendarCell v-for="day in week" :key="day.toString()" :date="day"><CalendarCellTrigger :day="day" :month="month.value" /></CalendarCell></CalendarGridRow></CalendarGridBody></CalendarGrid></Calendar>` }) }
CalendarCellTrigger
import { CalendarCellTrigger } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
day | DateValue | Required | The date value provided to the cell trigger |
month | DateValue | Required | The month in which the cell is rendered |
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | — | The element or component this component should render as. Can be overwritten by asChild. |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | {} | — | — |
Examples
These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Composition
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from './index'
{ render: () => ({ components: { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton }, template: `<Calendar v-slot="{ grid, weekDays }" class="rounded-lg border">
<CalendarHeader><CalendarPrevButton /><CalendarHeading /><CalendarNextButton /></CalendarHeader>
<CalendarGrid v-for="month in grid" :key="month.value.toString()"><CalendarGridHead><CalendarGridRow><CalendarHeadCell v-for="day in weekDays" :key="day">{{ day }}</CalendarHeadCell></CalendarGridRow></CalendarGridHead><CalendarGridBody><CalendarGridRow v-for="(week, index) in month.rows" :key="index"><CalendarCell v-for="day in week" :key="day.toString()" :date="day"><CalendarCellTrigger :day="day" :month="month.value" /></CalendarCell></CalendarGridRow></CalendarGridBody></CalendarGrid></Calendar>` }) }
CalendarGrid
import { CalendarGrid } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | — | The element or component this component should render as. Can be overwritten by asChild. |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | {} | — | — |
Examples
These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Composition
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from './index'
{ render: () => ({ components: { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton }, template: `<Calendar v-slot="{ grid, weekDays }" class="rounded-lg border">
<CalendarHeader><CalendarPrevButton /><CalendarHeading /><CalendarNextButton /></CalendarHeader>
<CalendarGrid v-for="month in grid" :key="month.value.toString()"><CalendarGridHead><CalendarGridRow><CalendarHeadCell v-for="day in weekDays" :key="day">{{ day }}</CalendarHeadCell></CalendarGridRow></CalendarGridHead><CalendarGridBody><CalendarGridRow v-for="(week, index) in month.rows" :key="index"><CalendarCell v-for="day in week" :key="day.toString()" :date="day"><CalendarCellTrigger :day="day" :month="month.value" /></CalendarCell></CalendarGridRow></CalendarGridBody></CalendarGrid></Calendar>` }) }
CalendarGridBody
import { CalendarGridBody } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | — | The element or component this component should render as. Can be overwritten by asChild. |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | {} | — | — |
Examples
These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Composition
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from './index'
{ render: () => ({ components: { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton }, template: `<Calendar v-slot="{ grid, weekDays }" class="rounded-lg border">
<CalendarHeader><CalendarPrevButton /><CalendarHeading /><CalendarNextButton /></CalendarHeader>
<CalendarGrid v-for="month in grid" :key="month.value.toString()"><CalendarGridHead><CalendarGridRow><CalendarHeadCell v-for="day in weekDays" :key="day">{{ day }}</CalendarHeadCell></CalendarGridRow></CalendarGridHead><CalendarGridBody><CalendarGridRow v-for="(week, index) in month.rows" :key="index"><CalendarCell v-for="day in week" :key="day.toString()" :date="day"><CalendarCellTrigger :day="day" :month="month.value" /></CalendarCell></CalendarGridRow></CalendarGridBody></CalendarGrid></Calendar>` }) }
CalendarGridHead
import { CalendarGridHead } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | — | The element or component this component should render as. Can be overwritten by asChild. |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | {} | — | — |
Examples
These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Composition
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from './index'
{ render: () => ({ components: { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton }, template: `<Calendar v-slot="{ grid, weekDays }" class="rounded-lg border">
<CalendarHeader><CalendarPrevButton /><CalendarHeading /><CalendarNextButton /></CalendarHeader>
<CalendarGrid v-for="month in grid" :key="month.value.toString()"><CalendarGridHead><CalendarGridRow><CalendarHeadCell v-for="day in weekDays" :key="day">{{ day }}</CalendarHeadCell></CalendarGridRow></CalendarGridHead><CalendarGridBody><CalendarGridRow v-for="(week, index) in month.rows" :key="index"><CalendarCell v-for="day in week" :key="day.toString()" :date="day"><CalendarCellTrigger :day="day" :month="month.value" /></CalendarCell></CalendarGridRow></CalendarGridBody></CalendarGrid></Calendar>` }) }
CalendarGridRow
import { CalendarGridRow } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | — | The element or component this component should render as. Can be overwritten by asChild. |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | {} | — | — |
Examples
These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Composition
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from './index'
{ render: () => ({ components: { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton }, template: `<Calendar v-slot="{ grid, weekDays }" class="rounded-lg border">
<CalendarHeader><CalendarPrevButton /><CalendarHeading /><CalendarNextButton /></CalendarHeader>
<CalendarGrid v-for="month in grid" :key="month.value.toString()"><CalendarGridHead><CalendarGridRow><CalendarHeadCell v-for="day in weekDays" :key="day">{{ day }}</CalendarHeadCell></CalendarGridRow></CalendarGridHead><CalendarGridBody><CalendarGridRow v-for="(week, index) in month.rows" :key="index"><CalendarCell v-for="day in week" :key="day.toString()" :date="day"><CalendarCellTrigger :day="day" :month="month.value" /></CalendarCell></CalendarGridRow></CalendarGridBody></CalendarGrid></Calendar>` }) }
CalendarHeadCell
import { CalendarHeadCell } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
asChild | boolean | undefined | — | Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. |
as | AsTag | Component | undefined | — | The element or component this component should render as. Can be overwritten by asChild. |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
default | {} | — | — |
Examples
These are authored Storybook examples. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Composition
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from './index'
{ render: () => ({ components: { Calendar, CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton }, template: `<Calendar v-slot="{ grid, weekDays }" class="rounded-lg border">
<CalendarHeader><CalendarPrevButton /><CalendarHeading /><CalendarNextButton /></CalendarHeader>
<CalendarGrid v-for="month in grid" :key="month.value.toString()"><CalendarGridHead><CalendarGridRow><CalendarHeadCell v-for="day in weekDays" :key="day">{{ day }}</CalendarHeadCell></CalendarGridRow></CalendarGridHead><CalendarGridBody><CalendarGridRow v-for="(week, index) in month.rows" :key="index"><CalendarCell v-for="day in week" :key="day.toString()" :date="day"><CalendarCellTrigger :day="day" :month="month.value" /></CalendarCell></CalendarGridRow></CalendarGridBody></CalendarGrid></Calendar>` }) }
CalendarHeader
import { CalendarHeader } from '@gxp-dev/app-ui'