JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q46296F
  • License MIT

A reusable Nepali (Bikram Sambat) calendar React component.

Package Exports

  • react-nepalipatro

Readme

📅 react-nepalipatro

A reusable and customizable Nepali (Bikram Sambat - BS) and English (AD) calendar component for React & Next.js applications. Supports event rendering, click handlers, and full styling flexibility.


✨ Features

  • 📆 Switch between Bikram Sambat (BS) and AD (Gregorian) calendars.
  • 🎉 Highlight days with events.
  • 🖱️ Day click handlers for interactive apps.
  • 🎨 Fully customizable styles via CSS Modules & props.
  • 🚀 Lightweight and optimized performance.
  • 🌐 Supports Devanagari fonts injection for BS rendering.

📦 Installation

npm install react-nepalipatro
import { NepaliCalendar } from "react-nepalipatro";

const MyComponent = () => {
  return (
    <NepaliCalendar
      calendarType="BS" // or "AD"
      events={[
        { id: 1, date: "2025-08-05", title: "Event Title" },
        { id: 2, date: "2025-08-06", title: "Another Event" },
      ]}
      onDayClick={({ bsDate, adDate, events }) => {
        console.log("Clicked date:", bsDate, adDate, events);
      }}
    />
  );
};