Installation
Install the package from npm using your preferred package manager.
npm
npm install nepali-bs-calendar-reactyarn
yarn add nepali-bs-calendar-reactpnpm
pnpm add nepali-bs-calendar-reactSetup (Required)
You must wrap your application (or the part using the calendar) with the NepaliCalendarProvider. This allows you to provide the calendar data dynamically.
import { NepaliCalendarProvider, defaultCalendarData } from 'nepali-bs-calendar-react'
function App() {
return (
<NepaliCalendarProvider data={defaultCalendarData}>
{/* Your components */}
</NepaliCalendarProvider>
)
}Include Styles
If your bundler does not automatically include library CSS, import it manually:
import 'nepali-bs-calendar-react/styles.css'Supported Date Range
The calendar currently supports dates from 2076 BS to 2090 BS based on the bundled calendar data.