@volvo-cars/react-calendar
v0.5.3
Published
Volvo Cars React Calendar component
Keywords
Readme
@volvo-cars/react-calendar
React components for building date and date-range pickers, backed by react-aria-components for full accessibility support. Provides both low-level composable primitives and ready-to-use simple variants.
What's included
Simple components
SimpleCalendar— A ready-to-use single-date calendar pickerSimpleRangeCalendar— A ready-to-use date-range calendar picker
Composable primitives
Calendar— Root component for a single-date calendarRangeCalendar— Root component for a date-range calendarCalendarGrid— Grid layout wrapper for calendar daysCalendarGridBody— Body rows of the calendar gridCalendarGridHeader— Header row of the calendar gridCalendarHeader— Month/year navigation header with previous/next controlsCalendarHeaderCell— Individual day-of-week header cellCalendarCell— Individual day cell within the calendar gridMonthSelect— Dropdown for selecting the displayed monthYearSelect— Dropdown for selecting the displayed yearWeekNumbers— Optional week number column
Helpers & hooks
getWeekNumber— Returns the ISO week number for a given dateuseWeekNumbers— Hook for computing week numbers for a calendar grid
Localisation
CalendarI18nProvider— Context provider for calendar locale (alias ofLocaleProvider)
Date utilities (re-exported from @internationalized/date)
today,parseDate,parseDateTime,parseTime,getLocalTimeZoneisSameDay,isSameMonth,isSameYear,isToday,isWeekday,isWeekendstartOfMonth,endOfMonth,startOfWeek,endOfWeek,startOfYear,endOfYear
Installation
yarn add @volvo-cars/react-calendar