Skip to main content
Version: v1 (Current)

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 commit fc6bfb108634735f1657e533206c3f8702ad357d; 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'

Repository source

Props​

NameTypeRequired / defaultDescription
defaultValueDateValue | undefined—The default value for the calendar
defaultPlaceholderDateValue | undefined—The default placeholder date
placeholderDateValue | undefined—The placeholder date, which is used to determine what month to display when no date is selected
pagedNavigationboolean | undefined—This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month
preventDeselectboolean | undefined—Whether or not to prevent the user from deselecting a date without selecting another date first
weekStartsOnWeekStartsOn | undefined—The day of the week to start the calendar on
weekdayFormatWeekDayFormat | undefined—The format to use for the weekday strings provided via the weekdays slot prop
calendarLabelstring | undefined—The accessible label for the calendar
fixedWeeksboolean | undefined—Whether or not to always display 6 weeks in the calendar
maxValueDateValue | undefined—The maximum date that can be selected
minValueDateValue | undefined—The minimum date that can be selected
localestring | undefined—The locale to use for formatting dates
numberOfMonthsnumber | undefined—The number of months to display at once
disabledboolean | undefined—Whether the calendar is disabled
readonlyboolean | undefined—Whether the calendar is readonly
initialFocusboolean | 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
isDateDisabledMatcher | undefined—A function that returns whether or not a date is disabled
isDateUnavailableMatcher | undefined—A function that returns whether or not a date is unavailable
dirDirection | 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.
modelValueDateValue | DateValue[] | null | undefined—The controlled selected date value of the calendar. Can be bound as v-model.
multipleboolean | undefined—Whether multiple dates can be selected
disableDaysOutsideCurrentViewboolean | undefined—Whether or not to disable days outside the current view.
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Events​

NameTypeRequired / defaultDescription
update:modelValue[date: DateValue | undefined]——
update:placeholder[date: DateValue]——

Slots​

NameTypeRequired / defaultDescription
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'

Repository source

Props​

NameTypeRequired / defaultDescription
dateDateValueRequiredThe date value for the cell
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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'

Repository source

Props​

NameTypeRequired / defaultDescription
dayDateValueRequiredThe date value provided to the cell trigger
monthDateValueRequiredThe month in which the cell is rendered
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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'

Repository source

Props​

NameTypeRequired / defaultDescription
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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'

Repository source

Props​

NameTypeRequired / defaultDescription
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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'

Repository source

Props​

NameTypeRequired / defaultDescription
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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'

Repository source

Props​

NameTypeRequired / defaultDescription
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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'

Repository source

Props​

NameTypeRequired / defaultDescription
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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'

Repository source

Props​

NameTypeRequired / defaultDescription
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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>` }) }

CalendarHeading​

import { CalendarHeading } from '@gxp-dev/app-ui'

Repository source

Props​

NameTypeRequired / defaultDescription
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
default{ headingValue: string; }——

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>` }) }

CalendarNextButton​

import { CalendarNextButton } from '@gxp-dev/app-ui'

Repository source

Props​

NameTypeRequired / defaultDescription
nextPage((placeholder: DateValue) => DateValue) | undefined—The function to be used for the next page. Overwrites the nextPage function set on the CalendarRoot.
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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>` }) }

CalendarPrevButton​

import { CalendarPrevButton } from '@gxp-dev/app-ui'

Repository source

Props​

NameTypeRequired / defaultDescription
prevPage((placeholder: DateValue) => DateValue) | undefined—The function to be used for the prev page. Overwrites the prevPage function set on the CalendarRoot.
asChildboolean | 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.
asAsTag | Component | undefined—The element or component this component should render as. Can be overwritten by asChild.

Slots​

NameTypeRequired / defaultDescription
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>` }) }