calendar

Calendar

Lets the shopper pick a date from a month grid, within a minimum and maximum, starting the week where the locale it is given does, one or several months side by side.

Parts

PartFileDoes
CalendarCalendar.vueLets the user pick a date from a monthly calendar.
CalendarCellCalendarCell.vueHolds one day in a row of the calendar grid.
CalendarCellTriggerCalendarCellTrigger.vueLets the user select a single day of the calendar.
CalendarGridCalendarGrid.vueLays out the days of one month in a grid.
CalendarGridBodyCalendarGridBody.vueHolds the weeks of the calendar grid.
CalendarGridHeadCalendarGridHead.vueHolds the row of weekday names above the calendar days.
CalendarGridRowCalendarGridRow.vueGroups the days of one week in the calendar grid.
CalendarHeadCellCalendarHeadCell.vueLabels one column of the calendar grid with a weekday name.
CalendarHeaderCalendarHeader.vueGroups the heading and month navigation above the calendar grid.
CalendarHeadingCalendarHeading.vueShows the month and year the calendar currently displays.
CalendarNextButtonCalendarNextButton.vueLets the user move the calendar to the next month.
CalendarPrevButtonCalendarPrevButton.vueLets the user move the calendar to the previous month.

Anatomy

<Calendar>
  <CalendarHeader>
    <CalendarHeading />
    <CalendarPrevButton />
    <CalendarNextButton />
  </CalendarHeader>
  <CalendarGrid>
    <CalendarGridHead>
      <CalendarGridRow>
        <CalendarHeadCell />
      </CalendarGridRow>
    </CalendarGridHead>
    <CalendarGridBody>
      <CalendarGridRow>
        <CalendarCell>
          <CalendarCellTrigger />
        </CalendarCell>
      </CalendarGridRow>
    </CalendarGridBody>
  </CalendarGrid>
</Calendar>

Styling

All of Calendar’s styles live in calendar.json. New to styling in Frontic UI? How styling works →

Install

Installs with it
native-select
npm packages
@internationalized/date
@lucide/vue
@vueuse/core
class-variance-authority
reka-ui

Built from

API reference

Calendar.vue

Lets the user pick a date from a monthly calendar. Renders a <div>.

Props 29

PropTypeDefault
defaultValueDateValue—
defaultPlaceholderDateValue—
placeholderDateValue—
pagedNavigationbooleanfalse
preventDeselectbooleanfalse
weekStartsOnWeekStartsOn—
weekdayFormatWeekDayFormat'narrow'
calendarLabelstring—
fixedWeeksbooleanfalse
maxValueDateValue—
minValueDateValue—
localestring—
numberOfMonthsnumber1
disabledbooleanfalse
readonlybooleanfalse
initialFocusbooleanfalse
isDateDisabledMatcher—
isDateUnavailableMatcher—
dirDirection—
nextPage((placeholder: DateValue) => DateValue)—
prevPage((placeholder: DateValue) => DateValue)—
modelValueDateValue | DateValue[] | null
multiplebooleanfalse
disableDaysOutsideCurrentViewbooleanfalse
asChildbooleanfalse
asAsTag | Component'div'
classClassValue—
layoutLayoutTypes
yearRangeDateValue[]—

Events 2

EventPayload
update:modelValuedate: DateValue | undefined
update:placeholderdate: DateValue

Slots 3

SlotSlot props
calendar-heading{ date: DateValue; month: ReuseTemplateComponent<{ date: DateValue; }, Record<"default", undefined>>; year: ReuseTemplateComponent<{ date: DateValue; }, Record<"default", undefined>>; }
calendar-prev-icon—
calendar-next-icon—

Data attributes 3

Data attributeValues
data-disabled—
data-invalid—
data-readonly—

Recipe calendar 1 group

Recipe calendar-select-label 1 group

CalendarCell.vue

CalendarCellTrigger.vue

CalendarGrid.vue

CalendarGridBody.vue

CalendarGridHead.vue

CalendarGridRow.vue

CalendarHeadCell.vue

CalendarHeader.vue

CalendarHeading.vue

CalendarNextButton.vue

CalendarPrevButton.vue
Calendar
State