logo
DocsInstallation

Installation

Install the package from npm using your preferred package manager.

npm

npm install nepali-bs-calendar-react

yarn

yarn add nepali-bs-calendar-react

pnpm

pnpm add nepali-bs-calendar-react

Setup (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.