# CalendarBaseProps (@salmonui/calendars/calendar)

> The CalendarBaseProps interface of @salmonui/calendars/calendar: Props shared by Calendar and RangeCalendar.

Canonical: https://salmonui.dev/docs/reference/calendars/calendar/CalendarBaseProps

```ts
import type { CalendarBaseProps } from '@salmonui/calendars/calendar';
```

Entry index: https://salmonui.dev/docs/reference/calendars/calendar (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/calendars/calendar.md).

## Reference

Kind: interface

```ts
interface CalendarBaseProps extends DivProps {
    readonly ref?: Ref<HTMLDivElement>;
    readonly granularity?: CalendarGranularity;
    readonly view?: CalendarView;
    readonly defaultView?: CalendarView;
    readonly onViewChange?: (view: CalendarView) => void;
    readonly minView?: CalendarView;
    readonly maxView?: CalendarView;
    readonly focusedValue?: DateInput | null;
    readonly defaultFocusedValue?: DateInput;
    readonly onFocusedValueChange?: (date: PlainDate) => void;
    readonly min?: DateInput;
    readonly max?: DateInput;
    readonly isDateDisabled?: (date: PlainDate) => boolean;
    readonly renderDay?: (ctx: CalendarDayContext) => ReactNode;
    readonly getDayProps?: (ctx: CalendarDayContext) => CalendarDayProps | undefined;
    readonly firstDayOfWeek?: number;
    readonly showWeekNumbers?: boolean;
    readonly weekRule?: WeekRule;
    readonly weekdayFormat?: WeekdayFormat;
    readonly calendar?: string;
    readonly locale?: string;
    readonly timeZone?: string;
    readonly showTodayButton?: boolean;
    readonly showOutsideDays?: boolean;
    readonly disabled?: boolean;
    readonly readOnly?: boolean;
    readonly localeText?: Partial<CalendarLocaleText>;
    readonly dir?: 'ltr' | 'rtl';
}
```

Props shared by `Calendar` and `RangeCalendar`.

Members (28):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `ref` | `readonly ref?: Ref<HTMLDivElement>;` | optional |  |
| `granularity` | `readonly granularity?: CalendarGranularity;` | optional | Deepest selectable unit; also the deepest view (`'month'` makes a month picker). Default `'day'`. |
| `view` | `readonly view?: CalendarView;` | optional |  |
| `defaultView` | `readonly defaultView?: CalendarView;` | optional |  |
| `onViewChange` | `readonly onViewChange?: (view: CalendarView) => void;` | optional |  |
| `minView` | `readonly minView?: CalendarView;` | optional | Deepest view the user can navigate to. Default: from `granularity`. |
| `maxView` | `readonly maxView?: CalendarView;` | optional | Highest view the heading button can reach. Default `'decade'`. |
| `focusedValue` | `readonly focusedValue?: DateInput \| null;` | optional | The date the calendar shows and focuses. |
| `defaultFocusedValue` | `readonly defaultFocusedValue?: DateInput;` | optional |  |
| `onFocusedValueChange` | `readonly onFocusedValueChange?: (date: PlainDate) => void;` | optional |  |
| `min` | `readonly min?: DateInput;` | optional | Earliest selectable date (unbounded by default). |
| `max` | `readonly max?: DateInput;` | optional | Latest selectable date (unbounded by default). |
| `isDateDisabled` | `readonly isDateDisabled?: (date: PlainDate) => boolean;` | optional | Disables single days (weekends, holidays); disabled days stay focusable. |
| `renderDay` | `readonly renderDay?: (ctx: CalendarDayContext) => ReactNode;` | optional | Content of a day cell; the default is the day number. |
| `getDayProps` | `readonly getDayProps?: (ctx: CalendarDayContext) => CalendarDayProps \| undefined;` | optional | Extra `className`, `style`, `title` and `data-*` for a day cell. |
| `firstDayOfWeek` | `readonly firstDayOfWeek?: number;` | optional | 0 Sunday ... 6 Saturday. Default: the locale's week info. |
| `showWeekNumbers` | `readonly showWeekNumbers?: boolean;` | optional |  |
| `weekRule` | `readonly weekRule?: WeekRule;` | optional | Which week of January is week 1. Default: the locale's minimal days. |
| `weekdayFormat` | `readonly weekdayFormat?: WeekdayFormat;` | optional | Weekday header width. Default `'short'`. |
| `calendar` | `readonly calendar?: string;` | optional | `Intl` calendar id (`'gregory'`, `'islamic-umalqura'`, `'japanese'`, ...). Default: the `-u-ca-` of `locale`, else Gregorian. |
| `locale` | `readonly locale?: string;` | optional | BCP 47 locale. Default `'en-US'`; the host locale is never read. |
| `timeZone` | `readonly timeZone?: string;` | optional | IANA zone for `Date` and offset inputs and for today. Default: the host zone on the client only. |
| `showTodayButton` | `readonly showTodayButton?: boolean;` | optional |  |
| `showOutsideDays` | `readonly showOutsideDays?: boolean;` | optional | Show the days of the previous and next month. Default `false`. |
| `disabled` | `readonly disabled?: boolean;` | optional |  |
| `readOnly` | `readonly readOnly?: boolean;` | optional |  |
| `localeText` | `readonly localeText?: Partial<CalendarLocaleText>;` | optional |  |
| `dir` | `readonly dir?: 'ltr' \| 'rtl';` | optional | Direction override; inherited from the document by default. |
