A customizable Bikram Sambat (Nepali) date picker and calendar built with Radix UI Popover and Tailwind CSS — compatible with shadcn/ui theming.
1npm install date-picker-bsTry it live
Selected: 2083 Jestha 17
A popover-based date picker with a customizable trigger button. Built on Radix UI Popover for accessibility.
1234567891011121314import { useState } from "react"import { DatePickerBS, getTodayBs } from "date-picker-bs" function App() { const [date, setDate] = useState(getTodayBs()) return ( <DatePickerBS value={date} onChange={setDate} className="w-[280px]" /> )}A standalone inline calendar component that can be embedded anywhere in your UI.
12345678910111213import { useState } from "react"import { CalendarBS } from "date-picker-bs" function App() { const [date, setDate] = useState() return ( <CalendarBS selected={date} onSelect={setDate} /> )}Switch to Nepali (Devanagari) with a single prop. Month names, weekday headers, and numerals are rendered in Nepali script.
123456<DatePickerBS lang="ne" value={date} onChange={setDate} className="w-[280px]"/>Override the display format with custom patterns using YYYY, MM, DD, MMMM, etc.
1234567<DatePickerBS value={date} onChange={setDate} formatOptions={{ pattern: "DD MMMM YYYY" }} placeholder="DD Month YYYY" className="w-[280px]"/>Restrict the selectable range with min/max dates or disable specific days with a custom callback.
12345678910111213141516const today = getTodayBs() <DatePickerBS value={date} onChange={setDate} minDate={today} maxDate={{ year: 2081, month: 6, day: 15 }} disabledDays={(d) => { // Disable weekends const dayIndex = ( d.year * 365 + d.month * 30 + d.day ) % 7 return dayIndex === 0 || dayIndex === 6 }} className="w-[280px]"/>Style every part of the calendar with the classNames prop or override CSS variables globally.
12345678910<CalendarBS selected={date} onSelect={setDate} classNames={{ month: "text-lg font-bold", day: "rounded-full hover:bg-primary/10", today: "ring-2 ring-primary", selected: "bg-primary text-primary-foreground", }}/>