v0.1.0 · Vanilla HTML / CSS / JS

Bikram Sambat date picker,
that speaks English underneath.

Nepali Calendar by SudamHub shows a Bikram Sambat calendar UI on any <input>. Pick a date in Nepali — a hidden field quietly receives the equivalent English (AD) date, ready for your form or database. No build step, no framework, no npm.

Read the docs →

Try it live — this is the real widget

Click the field — the calendar opens in Nepali.

Nepali UI, English value

The visible field shows the picked date in Bikram Sambat. A paired hidden input gets the AD equivalent automatically — your backend never has to know a Nepali calendar was involved.

Zero dependencies

No npm, no bundler, no framework. Two files loaded from the CDN, or copied next to your page — that's the entire footprint.

Verified conversions

BS 2000–2090 data, round-trip tested day-by-day across all 33,238 days in range. Zero mismatches.

01 · Get started

Installation

Two tags, one input. No build step, under a minute.

1

Add the stylesheet and script from the CDN

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sudam-shrestha/nepali-calender@main/src/nepali-calendar.css">
<script src="https://cdn.jsdelivr.net/gh/sudam-shrestha/nepali-calender@main/src/nepali-calendar.js"></script>
2

Add a plain text input

<input type="text" id="dob" name="dob">

Attach the picker

NepaliCalendar.attach('#dob', {
  lang: 'ne',
  nepaliDigits: true,
  hiddenInputName: 'dob_ad',
  onSelect: function (result) {
    console.log(result.bsFormatted); // '२०८२ श्रावण १५'
    console.log(result.adFormatted); // '2025-07-30'
  }
});
02 · Live demo

Try it, then see what gets submitted

Real widget, not a screenshot. Navigate months and years, pick a date, and watch the form payload update below.

No date selected yet — click the field above.

Form payload

dob (visible, Nepali)    -> (not selected) dob_ad (hidden, English) -> (not selected)
03 · API reference

Options

Passed as the second argument to NepaliCalendar.attach().

Option Default Controls
lang 'ne' Nepali script or English month names
nepaliDigits true Render digits as ०१२... instead of 012...
hiddenInputName <name>_ad Name of the auto-created hidden AD field
hiddenInputSelector Reuse an existing input instead of auto-creating one
onSelect Callback fired on date selection

Date conversion, no UI required

Just need BS ⟷ AD conversion without the picker widget? The same file exposes these directly.

Supported range: BS 2000–2090 (≈ AD 1943‑04‑14 to 2034‑04‑13).

// AD date -> BS
NepaliCalendar.adToBs(new Date()); // { year: 2083, month: 4, day: 4 }

// BS date -> AD
const ad = NepaliCalendar.bsToAd(2082, 4, 15); // JS Date
NepaliCalendar.formatAd(ad); // "2025-07-30"

// Display formatting
const bs = { year: 2082, month: 4, day: 15 };
NepaliCalendar.formatBs(bs, 'ne'); // "२०८२ श्रावण १५"
NepaliCalendar.formatBs(bs, 'en'); // "2082-04-15 (Shrawan)"

// Just the Nepali numerals
NepaliCalendar.toNepaliDigits(2082); // "२०८२"

Dates outside 2000–2090 BS throw an Error — wrap calls in try/catch if the input isn't already validated.

04 · FAQ

Frequently asked questions

What is Nepali Calendar by SudamHub?

A dependency-free JavaScript date picker that shows a Bikram Sambat (Nepali) calendar UI. When a date is selected, a hidden input receives the equivalent English (AD) date, so forms and databases keep working with ordinary Gregorian dates.

Do I need to install anything?

No. Two tags pointing at the jsDelivr CDN — one stylesheet link and one script tag. No npm install, no build step, no framework dependency.

What date range does it support?

Bikram Sambat 2000–2090, roughly AD 1943‑04‑14 to 2034‑04‑13. Conversions are round-trip tested day-by-day across the entire range with zero mismatches.

Is it free?

Yes, fully open source under the MIT license — free for personal and commercial projects.

Ready to drop it in?

Two tags. Under a minute. No more building a BS calendar from scratch.

View on GitHub →