Language

Localization

English or Nepali labels, Latin or Devanagari digits, and Gregorian dates alongside.

Locale and numerals

Two props control the language, on both components:

  • locale: "en" (the default) or "ne". It sets month names, weekday names, and every button and accessible label.
  • numerals: "latin" (0–9) or "devanagari" (०–९). It defaults to Devanagari for locale="ne" and Latin otherwise, and can be set independently.
<NepaliCalendar locale="ne" />                     // असोज २०८३, Devanagari digits
<NepaliCalendar locale="ne" numerals="latin" />    // असोज 2083
<NepaliCalendar numerals="devanagari" />           // Ashwin २०८३
Live demobikram-sambat-react@0.1.0
locale
numerals

असोज २०८३

आइतसोममंगलबुधबिहिशुक्रशनि

What changes

For 15 Ashwin 2083, shown with the default numerals for each locale:

Textlocale="en"locale="ne"
Month titleAshwin 2083असोज २०८३
Weekday headersSun Mon Tue Wed Thu Fri Satआइत सोम मंगल बुध बिहि शुक्र शनि
Day's accessible labelThursday, 15 Ashwin 2083२०८३ असोज १५, बिहिवार
Navigation buttonsPrevious month / Next monthअघिल्लो महिना / अर्को महिना
Month and year selectsMonth / Yearमहिना / वर्ष
Date picker placeholderYYYY-MM-DDवर्ष-महिना-गते
Date picker's input text2083-06-15२०८३-०६-१५
Calendar buttonChoose dateमिति छान्नुहोस्
Clear buttonClear dateमिति हटाउनुहोस्

The weekday headers show the short names; their full names (Sunday, आइतवार, …) are in each header's <abbr title>. The root element gets a matching lang attribute, so screen readers pronounce Nepali text correctly.

Month and weekday names come from bikram-sambat-ts, spelled as Hamro Patro's calendar spells them (see formatting).

Typing Nepali digits

The date picker's input accepts either digit system, whatever numerals is set to: 2083-06-15 and २०८३-०६-१५ both select 15 Ashwin 2083. Its hidden form value (with name) is always ASCII YYYY-MM-DD, so your server gets a parseable value in both locales.

Gregorian dates

showGregorianDate adds each day's AD date in small text under the BS day number. In Nepali, the AD dates use Devanagari digits and Nepali month names too. They're also added to each day's accessible label:

localeAccessible label of 15 Ashwin 2083
"en"Thursday, 15 Ashwin 2083 (1 October 2026 AD)
"ne"२०८३ असोज १५, बिहिवार (ईस्वी २०२६ अक्टोबर १)

See the demo on the calendar page.

ⓘ

Note: only English and Nepali are built in. The labels aren't configurable one by one yet; if you need another language, or different wording, open an issue on GitHub.