MiHCM
primitives/@mihcm/ui·v0.21.0·stable

Calendar

Date grid powered by @daypicker/react v10. Forwards the full DayPicker prop surface with MiHCM tokenized geometry, focus, and selection styles.

Props

The full prop API for Calendar. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.

PropTypeDefaultDescriptionSince
mode'single' | 'range' | 'multiple''single'DayPicker v10 selection mode.0.5.0
selectedDate | DateRange | Date[]Controlled selected date, range, or dates.0.5.0
onSelect(value, selectedDay, modifiers, event) => voidSelection change handler from DayPicker v10.0.5.0
requiredbooleanfalsePrevent clearing the current selection.0.10.1
min / maxnumberBound multiple selection count or range length depending on mode.0.10.1
disabledMatcher | Matcher[]Disable dates using DayPicker matchers.0.5.0
hiddenMatcher | Matcher[]Hide dates from the grid.0.10.1
month / defaultMonthDateControlled or uncontrolled visible month.0.10.1
onMonthChange(month: Date) => voidCalled when navigation changes the visible month.0.5.0
startMonth / endMonthDateBound navigation. Replaces deprecated v9 from/to props.0.10.1
captionLayout'label' | 'dropdown' | 'dropdown-months' | 'dropdown-years''label'Static caption or month/year dropdown captions.0.10.1
navLayout'after' | 'around'Navigation button placement and tab order.0.10.1
numberOfMonthsnumber1Number of month grids to display.0.5.0
pagedNavigationbooleanfalseNavigate by the displayed month page size.0.10.1
reverseMonths / reverseYearsbooleanfalseReverse rendered month order or dropdown year order.0.10.1
fixedWeeksbooleanfalseAlways render six week rows.0.10.1
showOutsideDaysbooleantrueShow days from adjacent months.0.5.0
hideWeekdays / showWeekNumberbooleanfalseToggle weekday headers or week-number column.0.10.1
locale / lang / dirDayPickerLocale | stringLocalization object, language tag, and text direction.0.10.1
weekStartsOn / ISOWeeknumber | booleanWeek-rule configuration.0.10.1
timeZone / noonSafestring | booleanTime-zone-aware calendar math.0.10.1
numeralsNumerals'latn'Numeral system for formatted dates.0.10.1
componentsPartial<CustomComponents>Override DayPicker v10 render slots.0.10.1
formatters / labelsPartial<Formatters> | Partial<Labels>Customize visible strings and ARIA labels.0.10.1
modifiersRecord<string, Matcher | Matcher[]>Named product-specific date states.0.10.1
modifiersClassNames / modifiersStylesobjectStyle named modifiers.0.10.1
footerReactNodeFooter live region for status text.0.10.1
className / classNames / style / stylesstring | objectTokenized root, element, and inline style overrides merged with MiHCM defaults.0.5.0

Import

import { Calendar } from '@mihcm/ui/Calendar';