API Reference

Required Props

PropTypeDefaultDescription
startrequiredDate-The currently selected start date.
endrequiredDate-The currently selected end date.
applyCallbackrequired(start: Date, end: Date) => void-Called when the user clicks Apply (or immediately when autoApply is true).
childrenrequiredReactNode-The trigger element. Clicking it opens the picker. Not used in standalone mode.

Date Constraints

PropTypeDefaultDescription
minDateDateundefinedEarliest selectable date. Cells before this are disabled.
maxDateDateundefinedLatest selectable date. Cells after this are disabled.
years[number, number][1900, currentYear]Constrains the year dropdown range.
displayMinDatebooleanfalseShow the formatted minDate in the footer.
displayMaxDatebooleanfalseShow the formatted maxDate in the footer.

Behavior

PropTypeDefaultDescription
rangesRecord<string, [Date, Date]>{}Preset range buttons. Each key is the label; value is a [start, end] Date tuple. When empty or omitted, the ranges panel is hidden.
autoApplybooleanfalseFires applyCallback immediately on every change. Hides the Apply button.
smartModebooleanfalseEnables flexible date selection: ping-pong selection (clicks alternate between start and end), auto-swap when a selection would create an invalid range, same-month calendar offset (right calendar shifts forward one month), and relaxed cell constraints (all cells clickable).
pastSearchFriendlybooleanfalseRequires smartMode. Modifies the same-month calendar offset so the left calendar shifts back one month instead of the right shifting forward. Useful for backward-in-time searches.
descendingYearsbooleantrueShow years in descending order in the dropdown. Set to false for ascending.
rangeCallback(index: number, value: string) => voidundefinedCalled when a preset range button is clicked.

Layout

PropTypeDefaultDescription
standalonebooleanfalseRenders the picker inline and always visible instead of as a dropdown.
alignment'left' | 'center' | 'right''left'Controls horizontal alignment of the dropdown relative to the trigger. "left" (default) opens left-aligned, "center" centers the dropdown, "right" aligns to the right edge.
noMobileModebooleanfalseAlways renders side-by-side regardless of screen width.
forceMobileModebooleanfalseAlways uses stacked/mobile layout.

Time

PropTypeDefaultDescription
twelveHoursClockbooleanfalseShows 12-hour time picker with AM/PM instead of 24-hour.

Styling

PropTypeDefaultDescription
themeTheme'sky'Color theme. 22 options based on Tailwind color names.
classNamesClassNamesundefinedObject for injecting custom CSS classes into specific UI zones.
localeLocaleundefinedLocalization object for customizing all text labels, date format, and first day of week.