Skip to content

BsDayPicker

The headless primitive mirrors the minimal React DayPicker API. Install via bs-calendar; see API overview for BsDate and BS ↔ AD.

BsDayPicker props

PropTypeDefaultDescription
mode"single" | "multiple" | "range""single"v1 implements single only
selectedBsDate | undefinedSelected date
onSelect(date?: BsDate) => voidSelection callback (BS only — see BS ↔ AD)
locale"en" | "ne""ne"Labels and digit formatting
month{ year, month }todayVisible month
onMonthChange(month) => voidMonth navigation callback
captionLayout"label" | "dropdown""label"Caption UI
showOutsideDaysbooleantrueShow adjacent-month days
disabledboolean | (date) => booleanDisable days
classNamestringRoot class
classNamesBsDayPickerClassNamesSlot class map
componentsBsDayPickerComponentsSub-component overrides
footerReactNodeFooter below grid

useBsCalendar

ts
const {
  month,
  weeks,
  weekdayLabels,
  years,
  months,
  goToPreviousMonth,
  goToNextMonth,
  setMonth,
  selectDate,
} = useBsCalendar({
  locale: "ne",
  month: { year: 2083, month: 1 },
  selected,
  onSelect,
});