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
| Name | Type | Description |
|---|---|---|
labelOptional | string | undefined | Accessible name describing what the date is used for. |
valueOptional |
| Selected date when controlled. Pass null for no selection. |
defaultValueOptional |
| Initially selected date when uncontrolled. |
startDateOptional |
| First visible date when controlled. |
defaultStartDateOptional |
| Initial first date when uncontrolled. Defaults to the selection or today. |
daysOptional | number | undefined | Days to show per page, from 1 through 31. Defaults to 5. |
minDateOptional |
| Inclusive lower bound for selection and pagination. |
maxDateOptional |
| Inclusive upper bound for selection and pagination. |
isDisabledOptional |
| Prevent individual dates from receiving focus or being selected. |
referenceDateOptional |
| Override today for deterministic rendering or a business time zone. |
localeOptional | string | undefined | Locale for month labels, day numbers, and full-date announcements. |
dirOptional | "ltr" | "rtl" | undefined | Text direction. Defaults to the surrounding layout. |
translationsOptional |
| Translated previous and next buttons. Use {days} for the page size. |
presetOptional |
| Theme preset for the date strip. |
classNameOptional | string | undefined | Extra class on the date strip. |
Events and callbacks2
| Name | Type | Description |
|---|---|---|
onValueChangeOptional |
| Reports selection with a date-only ISO string. |
onStartDateChangeOptional |
| Reports the first visible date after navigation. |
Methods0
No component-specific imperative methods. Use props and callbacks to control this component.