logo
DocsInstallation

Installation

Install the package from npm using your preferred package manager.

npm

npm install 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>
  )
}

Note: Data can be extracted from the scraper as well: nepali-calendar-scraper


Include Styles

If your bundler does not automatically include library CSS, import it manually:

import 'nepali-bs-calendar-react/styles.css'