True Bikram Sambat arithmetic
Day-by-day conversion backed by bundled BS year data, not a Gregorian approximation.
Open source · v1.0.0
Real Bikram Sambat arithmetic, English and Nepali localisation, single and range selection, and a typed adapter API—ready for production interfaces.
npm install bos-nepali-date
A complete component
The awkward parts—BS month lengths, conversion, masking, range state, accessibility, and localisation—are already handled. Your application keeps control of the value and the visual theme.
Day-by-day conversion backed by bundled BS year data, not a Gregorian approximation.
Use a compact date field, dual-month range picker, presets, or explicit apply and cancel actions.
Localise digits, weekdays, and month names while keeping emitted values predictable for application code.
Use the included adapter or bring a conversion table through the documented BsAdapter interface.
Sizes, visual variants, validation status, disabled dates, popover placement, and controlled visibility.
Keyboard dismissal, real buttons, labelled fields, focus management, and motion-sensitive behavior.
Small API, useful defaults
The component follows familiar controlled React patterns. Import its stylesheet once, pass the adapter, and keep the selected BS date in your own state.
import { useState } from 'react' import { NepaliDatePicker, defaultAdapter } from 'bos-nepali-date' import 'bos-nepali-date/style' export function PublicationDate() { const [date, setDate] = useState(null) return <NepaliDatePicker value={date} onChange={setDate} adapter={defaultAdapter} menu={{ lang: 'ne' }} /> }
Use the interactive demo, then copy the generated component configuration.