Skip to components
DEVELOPER REFERENCE

MiniCalendar API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

MiniCalendar15 props2 callbacks0 methods

Preset and CSS

Set preset.className to attach your CSS class to the component's rendered surface. Explicit component props take precedence over preset options.

CSS parts in the example [data-part="day"] [data-part="days"] [data-part="month"] [data-part="next"] [data-part="number"] [data-part="previous"] [data-part="root"]

State attributes in the example aria-current aria-pressed data-weekend

Use styles.root and styles.parts in a theme and generate a CSS file with themeToCss. For other JSON-friendly component props, spread presetProps(preset) before explicit props. Parts and states depend on configuration; the gallery shows those visible in the current preview.

Props15

MiniCalendar props
NameTypeDescription
labelOptionalstring | undefinedAccessible name describing what the date is used for.
valueOptional
ISODateString | null | undefinedInspect type
Selected date when controlled. Pass null for no selection.
defaultValueOptional
ISODateString | undefinedInspect type
Initially selected date when uncontrolled.
startDateOptional
ISODateString | undefinedInspect type
First visible date when controlled.
defaultStartDateOptional
ISODateString | undefinedInspect type
Initial first date when uncontrolled. Defaults to the selection or today.
daysOptionalnumber | undefinedDays to show per page, from 1 through 31. Defaults to 5.
minDateOptional
ISODateString | undefinedInspect type
Inclusive lower bound for selection and pagination.
maxDateOptional
ISODateString | undefinedInspect type
Inclusive upper bound for selection and pagination.
isDisabledOptional
((date: ISODateString) => boolean) | undefinedInspect type
Prevent individual dates from receiving focus or being selected.
referenceDateOptional
ISODateString | undefinedInspect type
Override today for deterministic rendering or a business time zone.
localeOptionalstring | undefinedLocale for month labels, day numbers, and full-date announcements.
dirOptional"ltr" | "rtl" | undefinedText direction. Defaults to the surrounding layout.
translationsOptional
{ previous?: string; next?: string; } | undefinedInspect type
Translated previous and next buttons. Use {days} for the page size.
presetOptional
ClassPreset | undefinedInspect type
Theme preset for the date strip.
classNameOptionalstring | undefinedExtra class on the date strip.

Events and callbacks2

MiniCalendar events and callbacks
NameTypeDescription
onValueChangeOptional
((date: ISODateString) => void) | undefinedInspect type
Reports selection with a date-only ISO string.
onStartDateChangeOptional
((date: ISODateString) => void) | undefinedInspect type
Reports the first visible date after navigation.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.