API reference: @salmonui/calendars/calendar
CalendarSinglePropsinterface
import type { CalendarSingleProps } from '@salmonui/calendars/calendar';interface CalendarSingleProps extends CalendarBaseProps {
readonly selectionMode?: 'single';
readonly value?: DateInput | null;
readonly defaultValue?: DateInput | null;
readonly onValueChange?: (value: PlainDate | null, details: CalendarChangeDetails) => void;
}
| Name | Signature | Description |
|---|---|---|
selectionModeoptional | readonly selectionMode?: 'single'; | |
valueoptional | readonly value?: DateInput | null; | |
defaultValueoptional | readonly defaultValue?: DateInput | null; | |
onValueChangeoptional | readonly onValueChange?: (value: PlainDate | null, details: CalendarChangeDetails) => void; | |
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. |