v2.0 is now live•Pure TypeScript, zero deps & React picker

The Professional
Nepali Calendar Kit

High-performance library for converting between Gregorian (AD) and Nepali (BS) dates. Includes an interactive date picker with full TypeScript support.

Get StartedView Documentation
Verified Bikram Sambat Engine२०८२ - २०८३ PANCHANG READY
Kathmandu Standard Time (GMT +5:45)Synchronized
1943–2043Verified Historical Range
0 DepsLightweight & Self-contained
100% TypedFull TypeScript Support
< 0.4µsHigh-performance Core

AD ↔ BS Conversion

Seamlessly convert between Gregorian and Nepali calendars with verified accuracy.

Interactive DatePicker

React component for selecting Nepali dates with full customization options.

Flexible Formatting

Multiple formatting options with Nepali numerals and localized month names.

Key Features & Architecture

Core Features

Engineered for mission-critical banking portals, HR systems, government services, and modern SaaS dashboards.

Accurate Conversion (1943+)TypeScript SupportZero DependenciesMulti-language
Conversion Engine

AD to BS & BS to AD

Convert AD (Gregorian) dates to BS (Bikram Sambat) and vice versa with precision.

TypeScript Execution0.18ms
adToBs(new Date('2026-02-12'));
// Result: { year: 2082, month: 10, day: 29 }

Multiple Formats

Format dates in YYYY-MM-DD, DD-MM-YYYY, DD/MM/YYYY, and custom configurations.

YYYY-MM-DDDD/MM/YYYYCustom Delimiters

Localization

Display Nepali dates with numeric, short, or long month names, and Nepali numerals (०१२३४५६७८९).

देवनागरी अंक० १ २ ३ ४ ५ ६ ७ ८ ९

Nepali DatePicker

React component with powerful theming, accessibility, and localization support built-in.

Drop-in JSX & TSX support

Fully Typed

First-class TypeScript support for robust development and auto-completion.

TypeScript v5.x Ready
Quick Start

1. Getting Started

Install the package and start converting dates in seconds with full type safety.

Installation
npm install @gambhirpoudel/nepali-calendar-kit

Next Steps

Explore each function below to see interactive demos and examples. All functions are fully typed with TypeScript for the best developer experience.

Quick Example
import { adToBs, formatBs } from "@gambhirpoudel/nepali-calendar-kit";

// Convert AD to BS
const bsDate = adToBs(new Date());

// Format the date
const formatted = formatBs(bsDate, 'YYYY-MM-DD');
console.log(formatted); // "२०८१-०१-२७"
Interactive Converter

2. Date Conversion

Seamlessly bridge the gap between Gregorian and Bikram Sambat calendars.

Quick Presets:
——
Pick a date and hit convert to see the result.
Weekday—
Nepali Ritu (Season)—
Interactive Playground

3. Customizable Component

A fully-featured React component with deep customization for any design system.

Localization
Calendar Language
Appearance
Primary Accent
#006194
Hover Background
#cce5ff
Behavior
Live Preview Interactive Component
Live NepaliDatePickerFully Interactive
Click a date in the calendar to select it
API Reference

Component Props

Detailed breakdown of all available configuration options for the NepaliDatePicker.

PropertyTypeDefaultDescription
onChange(result: DatePickerResult | null) => voidundefinedCallback when a date is selected
themeThemeundefinedCustom theming options
valuestring""Initial date value (YYYY-MM-DD)
formatDateFormat"YYYY-MM-DD"Display and input format
calLanLanguageCode"en"Language for all calendar labels
placeholderstringundefinedInput placeholder text
disabledbooleanfalseDisable the date picker
classNamestringundefinedAdditional CSS class name

Every prop is fully typed. Import types directly from@gambhirpoudel/nepali-calendar-kitfor editor autocomplete.

Theming Interface

Theme Interface

Deep customization options to perfectly align the component with your application's brand identity.

TypeScript Definition
interface Theme {
  primary?: string;       // Accent color (HEX/HSL)
  hoverBg?: string;       // Hover/Active background
  surfaceBg?: string;     // Popover surface background
  inputBg?: string;       // Input field background
  text?: string;          // Text color
  border?: string;        // Border color
  radius?: string;        // Border radius (e.g. '12px')
  fontFamily?: string;    // Custom font-stack
  shadow?: string;        // Box shadow definition
}
primary

#006194

The heartbeat of the UI. Applied to selected dates, buttons, and high-impact accents.

hoverBg

#cce5ff

Background color for hovered and active calendar cells.

radius

12px

Controls the architectural feel. Use px for precision or rem for responsive scales.

fontFamily

'Inter', sans-serif

Ensures typographic harmony. Defaults to system-ui but accepts any web font.

Use the live playground above to experiment with theme values — changes apply instantly to the rendered calendar.

Object Oriented

NepaliDate API

A first-class, immutable API that mirrors JavaScript's native Date object for the Bikram Sambat calendar.

Instant Initialization
const today = NepaliDate.today();
today.getYear(); // 2082
Flexible Creation
// From AD
new NepaliDate(new Date("2026-01-15"));

// From BS
new NepaliDate({ year: 2082, month: 10, day: 1 });
Formatting Power
// Default format (BS)
today.format(); // "२०८२-१०-०१"

// Custom long format
today.format("DD/MM/YYYY", "long", "short");
// "१२/भदौ/२०८२"

Why NepaliDate?

Provides a familiar interface for developers already comfortable with the JS Date API. It handles edge cases like leap months and historical discrepancies automatically.

Flexible Formatting

Date Format Playground

Mix and match date layouts with numeric, short, and long representations for months and days.

Date Format
Month Display
Day Display
Today is
२०८३-७-१३
Year2083
Month7
Day13
Equivalent Code
formatBs(
  { year: 2083, month: 7, day: 13 },
  'YYYY-MM-DD',
  'numeric',
  'numeric',
)
// Result: "२०८३-७-१३"

Every combination above maps 1:1 to a formatBs call — no extra parsing required.

Data Structure

Real-world Examples

See how the library parses and outputs data in different scenarios.

Core Logic

AD to BS Conversion

adToBs(new Date('2002-08-17'));
// Result:
// { year: 2059, month: 5, day: 1 }
Core Logic

Nepali Numerals

formatBs(
  { year: 2082, month: 10, day: 1 },
  'DD-MM-YYYY'
);
// Result: "१-१०-२०८२"
Core Logic

Rich Result Object

const result = {
  bs: '2082-10-29',
  ad: 'Thu Feb 12 2026',
  nepali: '२०८२-१०-२९'
}

The component returns a comprehensive object containing all necessary formats to minimize manual parsing.

Nepali Calendar Kit

Start building localized
experiences today.

The definitive calendar toolkit for modern Nepali applications. Reliable, lightweight, and incredibly easy to integrate.