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

DatePicker

DayPicker v10-backed trigger + popover for single dates, ranges, date-time, and time-only fields. Calendar and DatePicker share one date engine.

Props

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

PropTypeDefaultDescriptionSince
selectedDate | nullCurrently selected date.0.5.0
onChange(date) => voidCalled when a date is selected.0.5.0
dateFormatstring"MMM d, yyyy"Display format (date-fns tokens).0.5.0
placeholderTextstringInput placeholder text.0.5.0
disabledbooleanfalseDisable interaction.0.5.0
readOnlybooleanfalseInput visible but not editable.0.5.0
isClearablebooleanfalseShow a clear button.0.5.0
selectsRangebooleanfalseEnable date range selection.0.5.0
startDateDate | nullRange start date.0.5.0
endDateDate | nullRange end date.0.5.0
closeOnRangeCompletebooleanfalseOpt into closing the popover after both range endpoints are selected. Default keeps the range picker open.0.12.1
showTimeSelectbooleanfalseShow tokenized time input controls below the calendar.0.5.0
showTimeSelectOnlybooleanfalseTime-only selection mode.0.5.0
timeFormatstring"p"date-fns display format for time values.0.5.0
timeLabelstring"Time"Label for the tokenized time input.0.12.1
timeIntervalsnumberReserved compatibility prop for interval-based implementations.0.5.0
minDateDateEarliest selectable date.0.5.0
maxDateDateLatest selectable date.0.5.0
disabledDaysMatcher | Matcher[]DayPicker v10 matcher or matcher list for blocked dates.0.11.0
calendarPropsCalendarPropsPass-through props for the underlying DayPicker v10 Calendar. DatePicker defaults captionLayout to dropdown for month/year changes.0.11.0
showWeekNumbersbooleanfalseDisplay ISO week numbers.0.5.0
monthsShownnumber1Number of months displayed.0.5.0
showIconbooleantrueShow the leading calendar icon in the field trigger.0.5.0
triggerIconReactNode | nullDesign-system leading icon for the default trigger. Pass null to remove it.0.10.1
triggerVariant'field' | 'icon''field'Use the normal field trigger or a square icon-only trigger.0.12.1
triggerClassNamestringExtra Tailwind classes on the default trigger wrapper.0.10.1
triggerWidth'auto' | 'full''auto'Default trigger width behavior. Use full for form grids.0.10.1
align'start' | 'center' | 'end''start'Popover alignment relative to the trigger.0.12.1
classNamestringExtra classes on the DatePicker wrapper.0.5.0

Import

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