Calendar

The calendar view displays features on a grid calendar. Specifically it shows the end date of each feature, and groups features by day.

Installation

npx love-ui@latest add calendar

Usage

import { CalendarProvider, CalendarDate, CalendarDatePicker, CalendarMonthPicker, CalendarYearPicker, CalendarDatePagination, CalendarHeader, CalendarBody, CalendarItem } from "@/components/calendar"
<CalendarProvider>
  <CalendarDate>
    <CalendarDatePicker>
      <CalendarMonthPicker />
      <CalendarYearPicker start={2024} end={2025} />
    </CalendarDatePicker>
    <CalendarDatePagination />
  </CalendarDate>
  <CalendarHeader />
  <CalendarBody features={features}>
    {({ feature }) => <CalendarItem feature={feature} key={feature.id} />}
  </CalendarBody>
</CalendarProvider>

Features

  • Features are grouped by day
  • Features are color-coded by their status
  • Features are truncated if there are too many to fit in the grid cell
  • Selectable date range
  • Pagination of dates
  • Internationalization through locale prop

Examples

Without a date picker