logo
DocsIntroduction

Introduction

nepali-bs-calendar-react is a lightweight, responsive React Nepali Bikram Sambat calendar/date picker component.

This package provides a Nepali BS date picker with support for:

  • Dynamic calendar data via React Context
  • Static calendar component (non-popup)
  • Nepali Bikram Sambat calendar dates
  • Controlled date value
  • Minimum and maximum date limits
  • Disabled dates
  • Custom date disabling logic
  • Error message support
  • Responsive popup positioning
  • Portal-based dropdown rendering
  • CSS variable based styling overrides
  • Custom calendar component

Example

View the example here


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


New In version 1.0.1