Styling & customization
Tailor the DatePicker popper, calendar grid, and input appearance.
Colors and animation
colorPrimary/colorPrimaryLightmap to CSS vars--cl-color-primaryand--cl-color-primary-light.slideAnimationDurationdrives header and grid transitions (default0.4s).
<Calendar
value={selectedDay}
onChange={setSelectedDay}
colorPrimary="#0f766e"
colorPrimaryLight="#99f6e4"
slideAnimationDuration="250ms"
/>;Input customization (DatePicker only)
inputPlaceholder,inputClassName, andinputNamemirror native attributes.formatInputTextreturns a custom display string; when truthy, it overrides the built-in formatter.renderInput={({ ref }) => ...}fully replaces the input; pass the providedrefto keep focus/blur handling intact.
<DatePicker
value={selectedDay}
onChange={setSelectedDay}
formatInputText={() => (selectedDay ? '📅 ' + selectedDay.day : '')}
renderInput={({ ref }) => (
<button ref={ref} className="my-trigger">
{selectedDay ? `Chosen: ${selectedDay.day}` : 'Open picker'}
</button>
)}
/>;Layout hooks
calendarPopperPosition:'auto'(flips if near the viewport edge) or'top'.wrapperClassName: class on the outer DatePicker wrapper (includes input and popper).calendarClassName: extra class on the calendar root for bothDatePickerandCalendar.- Popper arrow and base styling live in the package CSS; override via your CSS if needed.
Day-level classes
calendarTodayClassName: applied to today when not selected.calendarSelectedDayClassName: single/multi selected days.- Range classes:
calendarRangeStartClassName,calendarRangeEndClassName,calendarRangeBetweenClassName. customDaysClassName: add per-day classes for holidays or events.shouldHighlightWeekends: toggles weekend styling based on localeweekDays.
<Calendar
value={selectedRange}
onChange={setSelectedRange}
calendarSelectedDayClassName="bg-green-500 text-white"
calendarRangeBetweenClassName="bg-green-100"
customDaysClassName={[
{ year: 2025, month: 5, day: 20, className: 'bg-amber-200' },
]}
shouldHighlightWeekends
/>;Footer content
Both Calendar and DatePicker accept renderFooter to render inline controls.
<DatePicker
value={selectedDay}
onChange={setSelectedDay}
renderFooter={() => (
<button onClick={() => setSelectedDay(utils().getToday())}>Today</button>
)}
/>;