Skip to content

Repository files navigation

react-nepali-datetime-picker

Registry-first Bikram Sambat (BS) date pickers for React (web) and React Native (Expo). Copy components into your app with the shadcn CLI — no npm runtime dependency.

The headless calendar engine lives in lib/bs-day-picker/ (BsDayPicker, useBsCalendar). Registry items are bs-calendar and bs-date-picker.

Quick start

git clone https://github.com/binodnepali/react-nepali-datetime-picker.git
cd react-nepali-datetime-picker
pnpm install
pnpm registry:build
pnpm dev

Docs: Getting started

Install in your app

After hosting docs (GitHub Pages: https://binodnepali.github.io/react-nepali-datetime-picker/), use apps/docs/public/r/ (web) or r-native/ (Expo):

{
  "registries": {
    "@react-nepali-datetime-picker": "https://binodnepali.github.io/react-nepali-datetime-picker/r/{name}.json"
  }
}
pnpm dlx shadcn@latest add @react-nepali-datetime-picker/bs-calendar
pnpm dlx shadcn@latest add @react-nepali-datetime-picker/bs-date-picker

Expo / React Native: use @react-nepali-datetime-picker-nativer-native/{name}.json. See React Native guide.

Monorepo

Path Purpose
packages/core @react-nepali-datetime-picker/core — BS calendar data + headless hook
registry/web, registry/native shadcn registry sources
apps/docs VitePress site + hosted registry JSON
scripts/scrape-hamropatro.mjs Regenerate bs-calendar.json from Hamro Patro

Scripts

Command Description
pnpm dev Docs dev server
pnpm registry:build Build web + native registry JSON
pnpm data:scrape Refresh Hamro Patro cache (use -- --years 2080-2089)
pnpm data:build Merge cache into full bs-calendar.json
pnpm data:refresh Scrape + build + validate (chain)
pnpm test Vitest (packages/core)
pnpm release:check Test, types, registry build + verify committed JSON

Versioning: VERSIONING.md (release-please Release PRs)

License

MIT

Releases

Packages

Used by

Contributors

Languages