API reference: @salmonui/calendars/calendar
RangeCalendarcomponent
import { RangeCalendar } from '@salmonui/calendars/calendar';function RangeCalendar(props: RangeCalendarProps): import("react").JSX.Element;
An inline calendar that selects a start and an end date.
Props: RangeCalendarProps
| Name | Signature | Description |
|---|---|---|
valueoptional | readonly value?: DateRange<DateInput> | null; | |
defaultValueoptional | readonly defaultValue?: DateRange<DateInput> | null; | |
onValueChangeoptional | readonly onValueChange?: (value: DateRange | null, details: CalendarChangeDetails) => void; | |
visibleMonthsoptional | readonly visibleMonths?: number; | Months shown side by side. Default 1. |
minDaysoptional | readonly minDays?: number; | Shortest allowed range in days (inclusive). |
maxDaysoptional | readonly maxDays?: number; | Longest allowed range in days (inclusive). |
rangeOverDisabledoptional | readonly rangeOverDisabled?: 'block' | 'allow'; |
|
refoptionalinherited | ref?: Ref<HTMLDivElement>; | |
granularityoptionalinherited | granularity?: CalendarGranularity; | Deepest selectable unit; also the deepest view ( |
viewoptionalinherited | view?: CalendarView; | |
defaultViewoptionalinherited | defaultView?: CalendarView; | |
onViewChangeoptionalinherited | onViewChange?: ((view: CalendarView) => void); | |
minViewoptionalinherited | minView?: CalendarView; | Deepest view the user can navigate to. Default: from |
maxViewoptionalinherited | maxView?: CalendarView; | Highest view the heading button can reach. Default |
focusedValueoptionalinherited | focusedValue?: DateInput | null; | The date the calendar shows and focuses. |
defaultFocusedValueoptionalinherited | defaultFocusedValue?: DateInput; | |
onFocusedValueChangeoptionalinherited | onFocusedValueChange?: ((date: PlainDate) => void); | |
minoptionalinherited | min?: DateInput; | Earliest selectable date (unbounded by default). |
maxoptionalinherited | max?: DateInput; | Latest selectable date (unbounded by default). |
isDateDisabledoptionalinherited | isDateDisabled?: ((date: PlainDate) => boolean); | Disables single days (weekends, holidays); disabled days stay focusable. |
renderDayoptionalinherited | renderDay?: ((ctx: CalendarDayContext) => ReactNode); | Content of a day cell; the default is the day number. |
getDayPropsoptionalinherited | getDayProps?: ((ctx: CalendarDayContext) => CalendarDayProps | undefined); | Extra |
firstDayOfWeekoptionalinherited | firstDayOfWeek?: number; | 0 Sunday ... 6 Saturday. Default: the locale's week info. |
showWeekNumbersoptionalinherited | showWeekNumbers?: boolean; | |
weekRuleoptionalinherited | weekRule?: WeekRule; | Which week of January is week 1. Default: the locale's minimal days. |
weekdayFormatoptionalinherited | weekdayFormat?: WeekdayFormat; | Weekday header width. Default |
calendaroptionalinherited | calendar?: string; |
|
localeoptionalinherited | locale?: string; | BCP 47 locale. Default |
timeZoneoptionalinherited | timeZone?: string; | IANA zone for |
showTodayButtonoptionalinherited | showTodayButton?: boolean; | |
showOutsideDaysoptionalinherited | showOutsideDays?: boolean; | Show the days of the previous and next month. Default |
disabledoptionalinherited | disabled?: boolean; | |
readOnlyoptionalinherited | readOnly?: boolean; | |
localeTextoptionalinherited | localeText?: Partial<CalendarLocaleText>; | |
diroptionalinherited | dir?: "ltr" | "rtl"; | Direction override; inherited from the document by default. |