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-nepalipatroimport { 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);
}}
/>
);
};