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 | undefined—Selected date
onSelect(date?: BsDate) => void—Selection callback (BS only — see BS ↔ AD)
locale"en" | "ne""ne"Labels and digit formatting
month{ year, month }todayVisible month
onMonthChange(month) => void—Month navigation callback
captionLayout"label" | "dropdown""label"Caption UI
showOutsideDaysbooleantrueShow adjacent-month days
disabledboolean | (date) => boolean—Disable days
classNamestring—Root class
classNamesBsDayPickerClassNames—Slot class map
componentsBsDayPickerComponents—Sub-component overrides
footerReactNode—Footer below grid

useBsCalendar ​

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