{"_id":"@arclogi/nepali-date-picker","_rev":"4-977806444b71b632a11045ab7d81ef24","name":"@arclogi/nepali-date-picker","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@arclogi/nepali-date-picker","version":"1.0.0","keywords":["nepali","nepali-calendar","bikram-sambat","bs-date","date-picker","react","typescript","calendar"],"author":{"name":"Sujil Devkota"},"license":"MIT","_id":"@arclogi/nepali-date-picker@1.0.0","maintainers":[{"name":"arc-logi","email":"sujil.devkota@arclogi.com"}],"homepage":"https://github.com/arclogi/nepali-date-picker#readme","bugs":{"url":"https://github.com/arclogi/nepali-date-picker/issues"},"dist":{"shasum":"0a3385421f86be5340d34cc203fa875b6daa77c8","tarball":"https://registry.npmjs.org/@arclogi/nepali-date-picker/-/nepali-date-picker-1.0.0.tgz","fileCount":16,"integrity":"sha512-TyY4NVReSIO2nZByTakpPa+jy24njyHPD7ewEzOj4R+KdKSJ73ApC0OwZGyzBRXf0FqNE0jwVYsR+P5HMj4tBA==","signatures":[{"sig":"MEYCIQDsAw66GqAIu7z7nGc/QeFXiVI6M5Z+bblsbpxr0Bc0mgIhAKZ48cT4vSeTYwP86zk+NHkG877VUUWch8zSDH3fx4BT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arclogi%2fnepali-date-picker@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":380459},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.9"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./core":{"import":{"types":"./dist/core.d.ts","default":"./dist/core.js"},"require":{"types":"./dist/core.d.cts","default":"./dist/core.cjs"}},"./styles.css":"./dist/styles.css","./package.json":"./package.json"},"gitHead":"365926fc24ea73648c0362be25c7af784d156e70","scripts":{"lint":"eslint .","test":"vitest run","build":"tsup && node scripts/postbuild.mjs","clean":"node scripts/clean.mjs","format":"prettier --check .","prepack":"npm run clean && npm run lint && npm run typecheck && npm run test && npm run build","demo:dev":"vite --config demo/vite.config.ts","typecheck":"tsc --noEmit","demo:build":"vite build --config demo/vite.config.ts","pack:check":"npm pack --dry-run","test:watch":"vitest","demo:preview":"vite preview --config demo/vite.config.ts","format:write":"prettier --write .","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"arc-logi","email":"sujil.devkota@arclogi.com"},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/arclogi/nepali-date-picker.git","type":"git"},"_npmVersion":"10.9.8","description":"Accessible React components and TypeScript utilities for Bikram Sambat Nepali date input.","directories":{},"sideEffects":["./dist/styles.css"],"_nodeVersion":"22.23.1","dependencies":{"nepali-date-converter":"^3.4.0"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"core":["./dist/core.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vite":"^6.4.3","react":"^19.2.7","eslint":"^9.39.4","vitest":"^3.2.6","globals":"^17.7.0","prettier":"^3.9.4","happy-dom":"^20.10.6","react-dom":"^19.2.7","@eslint/js":"^9.39.4","typescript":"^6.0.3","@types/node":"^26.1.0","@types/react":"^19.2.17","@types/react-dom":"^19.2.3","typescript-eslint":"^8.62.1","@vitest/coverage-v8":"^3.2.6","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1","eslint-plugin-react-hooks":"^7.1.1","@testing-library/user-event":"^14.6.1","eslint-plugin-react-refresh":"^0.5.3"},"peerDependencies":{"react":">=18.2.0 <20"},"_npmOperationalInternal":{"tmp":"tmp/nepali-date-picker_1.0.0_1783240578171_0.6645659047237507","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@arclogi/nepali-date-picker","version":"1.0.1","keywords":["nepali","nepali-calendar","bikram-sambat","bs-date","date-picker","react","typescript","calendar"],"author":{"name":"Sujil Devkota"},"license":"MIT","_id":"@arclogi/nepali-date-picker@1.0.1","maintainers":[{"name":"arc-logi","email":"sujil.devkota@arclogi.com"}],"homepage":"https://github.com/arclogi/nepali-date-picker#readme","bugs":{"url":"https://github.com/arclogi/nepali-date-picker/issues"},"dist":{"shasum":"9f7e5256eb4ca7fefde3ef624db96a69b2eaef22","tarball":"https://registry.npmjs.org/@arclogi/nepali-date-picker/-/nepali-date-picker-1.0.1.tgz","fileCount":16,"integrity":"sha512-enN6Bo75AV7xoM7xOsDC2cf1FWs/5T2KwIPFBucJEQCXDPCe414JBlcVLGxfu9YI2eM0+j2hpmZTEZ/xXtEcWg==","signatures":[{"sig":"MEUCIHgEG4h1cIC9zO7H4uHEFj1C+JUy7v80HnyFcNSaRLedAiEA3Aiok5ixO8K+Z3UlxIxbp80KZhEqdMPqSeq+ovv3fWo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arclogi%2fnepali-date-picker@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":382184},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.9"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./core":{"import":{"types":"./dist/core.d.ts","default":"./dist/core.js"},"require":{"types":"./dist/core.d.cts","default":"./dist/core.cjs"}},"./styles.css":"./dist/styles.css","./package.json":"./package.json"},"gitHead":"e8b20ad7cd210ee872cdfc382b9737117034c8c4","scripts":{"lint":"eslint .","test":"vitest run","build":"tsup && node scripts/postbuild.mjs","clean":"node scripts/clean.mjs","format":"prettier --check .","prepack":"npm run clean && npm run lint && npm run typecheck && npm run test && npm run build","demo:dev":"vite --config demo/vite.config.ts","typecheck":"tsc --noEmit","demo:build":"vite build --config demo/vite.config.ts","pack:check":"npm pack --dry-run","test:watch":"vitest","demo:preview":"vite preview --config demo/vite.config.ts","format:write":"prettier --write .","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"arc-logi","email":"sujil.devkota@arclogi.com"},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/arclogi/nepali-date-picker.git","type":"git"},"_npmVersion":"10.9.8","description":"Accessible React components and TypeScript utilities for Bikram Sambat Nepali date input.","directories":{},"sideEffects":["./dist/styles.css"],"_nodeVersion":"22.23.1","dependencies":{"nepali-date-converter":"^3.4.0"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"core":["./dist/core.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vite":"^6.4.3","react":"^19.2.7","eslint":"^9.39.4","vitest":"^3.2.6","globals":"^17.7.0","prettier":"^3.9.4","happy-dom":"^20.10.6","react-dom":"^19.2.7","@eslint/js":"^9.39.4","typescript":"^6.0.3","@types/node":"^26.1.0","@types/react":"^19.2.17","@types/react-dom":"^19.2.3","typescript-eslint":"^8.62.1","@vitest/coverage-v8":"^3.2.6","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1","eslint-plugin-react-hooks":"^7.1.1","@testing-library/user-event":"^14.6.1","eslint-plugin-react-refresh":"^0.5.3"},"peerDependencies":{"react":">=18.2.0 <20"},"_npmOperationalInternal":{"tmp":"tmp/nepali-date-picker_1.0.1_1783245818943_0.26616400568865073","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@arclogi/nepali-date-picker","version":"1.0.2","keywords":["nepali","nepali-calendar","bikram-sambat","bs-date","date-picker","react","typescript","calendar"],"author":{"name":"Sujil Devkota"},"license":"MIT","_id":"@arclogi/nepali-date-picker@1.0.2","maintainers":[{"name":"arc-logi","email":"sujil.devkota@arclogi.com"}],"homepage":"https://github.com/arclogi/nepali-date-picker#readme","bugs":{"url":"https://github.com/arclogi/nepali-date-picker/issues"},"dist":{"shasum":"19e1db8384a52a48cb0c85e94fa76d1d101bab7a","tarball":"https://registry.npmjs.org/@arclogi/nepali-date-picker/-/nepali-date-picker-1.0.2.tgz","fileCount":16,"integrity":"sha512-U+5JATdjxmbdmYuFSVS6IvljfIrLrxsMKABoEjuGdcY+LdfnqslhJv87jMhgk+hoB7A2YlUOue7/6PTgff7pLw==","signatures":[{"sig":"MEUCIQCPUFwEU94t9pYqDLXQZdEgJH8dDzIts3vjBFvHffWU2QIgT+yQRwThioZDZKvJeBkjAmYX5wtYxlEOMDLj1mwmiZQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arclogi%2fnepali-date-picker@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":387029},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.9"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./core":{"import":{"types":"./dist/core.d.ts","default":"./dist/core.js"},"require":{"types":"./dist/core.d.cts","default":"./dist/core.cjs"}},"./styles.css":"./dist/styles.css","./package.json":"./package.json"},"gitHead":"44a22aed58a0e12e8854a063d367f3d1cc34e14a","scripts":{"lint":"eslint .","test":"vitest run","build":"tsup && node scripts/postbuild.mjs","clean":"node scripts/clean.mjs","format":"prettier --check .","prepack":"npm run clean && npm run lint && npm run typecheck && npm run test && npm run build","demo:dev":"vite --config demo/vite.config.ts","typecheck":"tsc --noEmit","demo:build":"vite build --config demo/vite.config.ts","pack:check":"npm pack --dry-run","test:watch":"vitest","demo:preview":"vite preview --config demo/vite.config.ts","format:write":"prettier --write .","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"arc-logi","email":"sujil.devkota@arclogi.com"},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/arclogi/nepali-date-picker.git","type":"git"},"_npmVersion":"10.9.8","description":"Accessible React components and TypeScript utilities for Bikram Sambat Nepali date input.","directories":{},"sideEffects":["./dist/styles.css"],"_nodeVersion":"22.23.1","dependencies":{"nepali-date-converter":"^3.4.0"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"core":["./dist/core.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vite":"^6.4.3","react":"^19.2.7","eslint":"^9.39.4","vitest":"^3.2.6","globals":"^17.7.0","prettier":"^3.9.4","happy-dom":"^20.10.6","react-dom":"^19.2.7","@eslint/js":"^9.39.4","typescript":"^6.0.3","@types/node":"^26.1.0","@types/react":"^19.2.17","@types/react-dom":"^19.2.3","typescript-eslint":"^8.62.1","@vitest/coverage-v8":"^3.2.6","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1","eslint-plugin-react-hooks":"^7.1.1","@testing-library/user-event":"^14.6.1","eslint-plugin-react-refresh":"^0.5.3"},"peerDependencies":{"react":">=18.2.0 <20"},"_npmOperationalInternal":{"tmp":"tmp/nepali-date-picker_1.0.2_1783684357828_0.5319028967779644","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"_id":"@arclogi/nepali-date-picker@1.0.3","bugs":{"url":"https://github.com/arclogi/nepali-date-picker/issues"},"dist":{"shasum":"ca7fb5a156a7f97642c294e1babfba8d8d2756ab","tarball":"https://registry.npmjs.org/@arclogi/nepali-date-picker/-/nepali-date-picker-1.0.3.tgz","fileCount":16,"integrity":"sha512-nlBQjw840hA+cI0fo6iMV2v/KHnCSaxiQfvSdD/HZ5MDNeFs6GcTYRaezEZ+TDUoBRdVNMuI5Q2xaixo7V3ouA==","signatures":[{"sig":"MEYCIQC8e6dBmonxuizWvOXeAJIcSm3iUL6xmeLPLDztkh+cdwIhAIsNi92XC2I4lXkWSqxWm8xcwtG4dHU5hgtG3QhhJUdx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAVO5nU7033UtbmoVI3wBMeieiladvUTzrt724VzO3RjAiAxu5uRjE8z+MP37nDduIRAdS4zudNXlyk8lKYPnTyE9A=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@arclogi%2fnepali-date-picker@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":395170},"main":"./dist/index.cjs","name":"@arclogi/nepali-date-picker","type":"module","types":"./dist/index.d.ts","author":{"name":"Sujil Devkota"},"module":"./dist/index.js","engines":{"node":">=20.9"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./core":{"import":{"types":"./dist/core.d.ts","default":"./dist/core.js"},"require":{"types":"./dist/core.d.cts","default":"./dist/core.cjs"}},"./styles.css":"./dist/styles.css","./package.json":"./package.json"},"gitHead":"3e100e6f6887e9542b5ccf43813c806b66a5eae1","license":"MIT","scripts":{"lint":"eslint .","test":"vitest run","build":"tsup && node scripts/postbuild.mjs","clean":"node scripts/clean.mjs","format":"prettier --check .","prepack":"npm run clean && npm run lint && npm run typecheck && npm run test && npm run build && npm run typecheck:package","demo:dev":"vite --config demo/vite.config.ts","typecheck":"tsc --noEmit","demo:build":"vite build --config demo/vite.config.ts","pack:check":"npm pack --dry-run","test:watch":"vitest","demo:preview":"vite preview --config demo/vite.config.ts","format:write":"prettier --write .","test:coverage":"vitest run --coverage","typecheck:package":"tsc --project tests/compatibility/tsconfig.json"},"version":"1.0.3","_npmUser":{"name":"arc-logi","email":"sujil.devkota@arclogi.com"},"homepage":"https://github.com/arclogi/nepali-date-picker#readme","keywords":["nepali","nepali-calendar","bikram-sambat","bs-date","date-picker","react","typescript","calendar"],"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/arclogi/nepali-date-picker.git","type":"git"},"_npmVersion":"10.9.8","description":"Accessible React components and TypeScript utilities for Bikram Sambat Nepali date input.","directories":{},"maintainers":[{"name":"arc-logi","email":"sujil.devkota@arclogi.com"}],"sideEffects":["./dist/styles.css"],"_nodeVersion":"22.23.2","dependencies":{"nepali-date-converter":"^3.4.0"},"publishConfig":{"access":"public"},"typesVersions":{"*":{"core":["./dist/core.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vite":"^6.4.3","react":"^19.3.0","eslint":"^9.39.4","vitest":"^4.1.11","globals":"^17.7.0","prettier":"^3.9.4","happy-dom":"^20.10.6","react-dom":"^19.3.0","@eslint/js":"^9.39.4","typescript":"^6.0.3","@types/node":"^26.1.0","@types/react":"^19.3.0","@types/react-dom":"^19.3.0","typescript-eslint":"^8.62.1","@vitest/coverage-v8":"^4.1.11","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@testing-library/jest-dom":"^6.9.1","eslint-plugin-react-hooks":"^7.1.1","@testing-library/user-event":"^14.6.1","eslint-plugin-react-refresh":"^0.5.3"},"peerDependencies":{"react":">=18.2.0 <20"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nepali-date-picker_1.0.3_1790753291035_0.9444596532767371"}}},"time":{"created":"2026-07-05T08:36:18.076Z","modified":"2026-09-30T07:28:11.517Z","1.0.0":"2026-07-05T08:36:18.362Z","1.0.1":"2026-07-05T10:03:39.087Z","1.0.2":"2026-07-10T11:52:38.013Z","1.0.3":"2026-09-30T07:28:11.169Z"},"bugs":{"url":"https://github.com/arclogi/nepali-date-picker/issues"},"author":{"name":"Sujil Devkota"},"license":"MIT","homepage":"https://github.com/arclogi/nepali-date-picker#readme","keywords":["nepali","nepali-calendar","bikram-sambat","bs-date","date-picker","react","typescript","calendar"],"repository":{"url":"git+https://github.com/arclogi/nepali-date-picker.git","type":"git"},"description":"Accessible React components and TypeScript utilities for Bikram Sambat Nepali date input.","maintainers":[{"name":"arc-logi","email":"sujil.devkota@arclogi.com"}],"readme":"# @arclogi/nepali-date-picker\n\nAccessible React components and TypeScript utilities for Bikram Sambat (BS) Nepali date input.\n\nOne package for the whole job: a drop-in date input with a popover calendar, a standalone\ncalendar grid, and the full set of BS/AD conversion and date-math utilities underneath —\nlightweight, dependency-lean, and themeable with plain CSS variables.\n\nLive demo: [arclogi.github.io/nepali-date-picker](https://arclogi.github.io/nepali-date-picker/)\n\n## Features\n\n- React 18 and React 19 compatible (including 19.3); ships `\"use client\"` for Next.js App Router.\n- Public declarations checked with TypeScript 5.9, 6, and 7 in ESM and CommonJS projects.\n- TypeScript-first public API with correct types for both ESM and CommonJS consumers.\n- `NepaliDateInput` / `NepaliDatePicker`: popover picker with typing support, clear button,\n  controlled or uncontrolled value and open state, and hidden-input form integration.\n- `NepaliCalendar`: standalone month grid with fast month/year dropdown navigation and a\n  Today shortcut.\n- English and Nepali (Devanagari) localization.\n- Full keyboard support and WAI-ARIA grid/dialog semantics; visible focus states.\n- AD ↔ BS conversion, parsing, formatting, comparison, clamping, and date math utilities —\n  also available from a server-safe `./core` entry.\n- Themeable via `--ndp-*` CSS custom properties and stable, documented class names, with an\n  opt-in dark theme.\n- BS 2000 – BS 2090 supported range with safe, non-crashing behavior at the boundaries.\n\n## Install\n\n```sh\nnpm install @arclogi/nepali-date-picker\n```\n\nThe npm package name is scoped because the unscoped `nepali-date-picker` name is already used\nby a legacy jQuery package.\n\n## Quick start\n\n```tsx\nimport { useState } from 'react';\nimport { NepaliDateInput, type NepaliDateValue } from '@arclogi/nepali-date-picker';\nimport '@arclogi/nepali-date-picker/styles.css';\n\nexport function ProfileForm() {\n  const [dob, setDob] = useState<NepaliDateValue | null>(null);\n\n  return (\n    <>\n      <label htmlFor=\"dob\">Date of birth (BS)</label>\n      <NepaliDateInput\n        id=\"dob\"\n        value={dob}\n        onChange={(date) => setDob(date)}\n        placeholder=\"YYYY-MM-DD\"\n        maxDate={{ year: 2085, month: 12, day: 30 }}\n      />\n    </>\n  );\n}\n```\n\n### Standalone calendar\n\n```tsx\nimport { NepaliCalendar } from '@arclogi/nepali-date-picker';\nimport '@arclogi/nepali-date-picker/styles.css';\n\nexport function CalendarExample() {\n  return (\n    <NepaliCalendar\n      defaultViewDate={{ year: 2081, month: 1 }}\n      locale=\"ne\"\n      onChange={(date, context) => {\n        console.log(date, context.ad, context.formatted);\n      }}\n    />\n  );\n}\n```\n\n## Components\n\n### `<NepaliDateInput />` (alias: `<NepaliDatePicker />`)\n\nA text input with a popover calendar. Accepts every native `<input>` prop (except the ones it\nmanages) plus:\n\n| Prop                                                                      | Type                                     | Default        | Description                                                                                                                                  |\n| ------------------------------------------------------------------------- | ---------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `value`                                                                   | `NepaliDateValue \\| null`                | —              | Controlled selected date.                                                                                                                    |\n| `defaultValue`                                                            | `NepaliDateValue`                        | —              | Initial date when uncontrolled.                                                                                                              |\n| `onChange`                                                                | `(date, context) => void`                | —              | Fires with the new date (or `null` on clear) and a `NepaliDateChangeContext` (`{ ad, bs, formatted }`).                                      |\n| `open` / `defaultOpen`                                                    | `boolean`                                | `false`        | Controlled / initial popover visibility.                                                                                                     |\n| `onOpenChange`                                                            | `(open: boolean) => void`                | —              | Popover visibility change requests.                                                                                                          |\n| `readOnly`                                                                | `boolean`                                | `true`         | With `readOnly={false}`, users can type a date using ASCII or Devanagari digits; it is committed on Enter or blur, and invalid text reverts. |\n| `clearable`                                                               | `boolean`                                | `true`         | Show the clear button when a date is selected.                                                                                               |\n| `closeOnSelect`                                                           | `boolean`                                | `true`         | Close the popover after picking a date.                                                                                                      |\n| `name`                                                                    | `string`                                 | —              | Renders a hidden input carrying the canonical `YYYY-MM-DD` value (ASCII digits, regardless of locale) for HTML form posts.                   |\n| `format`                                                                  | `string`                                 | `'YYYY-MM-DD'` | Display format (converter tokens: `YYYY`, `MM`, `MMMM`, `DD`, `ddd`, …).                                                                     |\n| `locale`                                                                  | `'en' \\| 'ne'`                           | `'en'`         | Localizes the display value and calendar.                                                                                                    |\n| `minDate` / `maxDate`                                                     | `NepaliDateValue`                        | —              | Selection and navigation bounds.                                                                                                             |\n| `disabledDates`                                                           | `NepaliDateValue[] \\| (date) => boolean` | —              | Dates that cannot be selected.                                                                                                               |\n| `viewDate` / `defaultViewDate`                                            | `NepaliMonthValue`                       | —              | Controlled / initial visible month.                                                                                                          |\n| `weekStartsOn`                                                            | `0–6`                                    | `0` (Sunday)   | First day of the week.                                                                                                                       |\n| `calendarProps`                                                           | `object`                                 | —              | Extra props for the embedded `NepaliCalendar` (e.g. `showTodayButton`).                                                                      |\n| `className` / `inputClassName` / `popoverClassName` / `calendarClassName` | `string`                                 | —              | Class hooks for each layer.                                                                                                                  |\n\nA `ref` is forwarded to the native `<input>` element.\n\nThe popover opens on click, ArrowDown, or Enter/Space (when read-only) — not on focus alone —\nand closes on outside click, Escape, or when focus leaves the component, returning focus to the\ninput. It automatically flips above the input when there is not enough room below; the flip\ndirection is measured when the popover opens and is not re-evaluated while scrolling with the\npopover held open.\n\n### `<NepaliCalendar />`\n\nThe standalone month grid used inside the popover.\n\n| Prop                           | Type                                     | Default                | Description                                                                        |\n| ------------------------------ | ---------------------------------------- | ---------------------- | ---------------------------------------------------------------------------------- |\n| `value`                        | `NepaliDateValue \\| null`                | —                      | Selected date. The visible month follows controlled value changes.                 |\n| `onChange`                     | `(date, context) => void`                | —                      | Selection callback.                                                                |\n| `viewDate` / `defaultViewDate` | `NepaliMonthValue`                       | —                      | Controlled / initial visible month.                                                |\n| `onViewDateChange`             | `(view) => void`                         | —                      | Visible month change requests.                                                     |\n| `minDate` / `maxDate`          | `NepaliDateValue`                        | —                      | Bounds for selection, navigation, and the year dropdown.                           |\n| `disabledDates`                | `NepaliDateValue[] \\| (date) => boolean` | —                      | Unselectable dates (kept focusable for keyboard users, per the ARIA grid pattern). |\n| `showTodayButton`              | `boolean`                                | `true`                 | Show the Today shortcut in the footer.                                             |\n| `locale`                       | `'en' \\| 'ne'`                           | `'en'`                 | Month names, weekday names, and digits.                                            |\n| `weekStartsOn`                 | `0–6`                                    | `0`                    | First day of the week.                                                             |\n| `fixedWeeks`                   | `boolean`                                | `true`                 | Always render six weeks.                                                           |\n| `format`                       | `string`                                 | `'YYYY-MM-DD'`         | Format used for the `context.formatted` value.                                     |\n| `ariaLabel`                    | `string`                                 | `Calendar for <month>` | Accessible name for the grid.                                                      |\n| `autoFocus`                    | `boolean`                                | `false`                | Move focus into the grid on mount (used by the popover for keyboard openers).      |\n\nKeyboard: arrow keys move by day/week, `Home`/`End` jump to the week edges, `PageUp`/`PageDown`\nswitch months, `Enter`/`Space` select. Month and year dropdowns in the header jump anywhere in\nthe supported range without paging.\n\n## Utilities\n\nAll utilities are exported from the package root and from the server-safe subpath\n`@arclogi/nepali-date-picker/core` (no `\"use client\"` directive, no React import), which is the\none to use inside React Server Components.\n\n```ts\nimport {\n  toBS,\n  toAD, // AD ↔ BS conversion (throws RangeError outside BS 2000–2090)\n  parseNepaliDate,\n  formatNepaliDate, // 'YYYY-MM-DD' parsing and token-based formatting\n  toNepaliDateKey, // canonical ASCII 'YYYY-MM-DD' key\n  getNepaliToday, // today's BS date; pass a time zone, e.g. getNepaliToday('Asia/Kathmandu')\n  isValidNepaliDate,\n  assertValidNepaliDate,\n  compareNepaliDates,\n  isSameNepaliDate,\n  isNepaliDateBefore,\n  isNepaliDateAfter,\n  addNepaliDays,\n  addNepaliMonths,\n  startOfNepaliMonth,\n  endOfNepaliMonth,\n  getDaysInNepaliMonth,\n  clampNepaliDate, // clamp into a { min, max } range\n  getNepaliMonthGrid, // calendar grid cells for custom pickers\n  getNepaliMonthLabel,\n  getNepaliMonthNames,\n  getWeekdayLabels,\n  isDateDisabled,\n  MIN_BS_DATE,\n  MAX_BS_DATE,\n  SUPPORTED_BS_YEAR_RANGE,\n  getSupportedAdRange,\n} from '@arclogi/nepali-date-picker/core';\n\ntoBS(new Date(2024, 3, 13)); // { year: 2081, month: 1, day: 1 }\ntoAD({ year: 2081, month: 1, day: 1 }); // local-noon Date for 2024-04-13\nformatNepaliDate({ year: 2081, month: 1, day: 1 }, 'DD MMMM YYYY', 'ne'); // '०१ बैशाख २०८१'\ngetNepaliToday('Asia/Kathmandu'); // today's BS date in Nepal, on any server\n```\n\n`getNepaliToday()` with no argument uses the machine's local calendar day; pass\n`'Asia/Kathmandu'` when you need Nepal's civil day regardless of where the code runs.\n\n## Theming and customization\n\nImport the stylesheet once, then override the CSS custom properties — globally on `:root` or\nscoped to any wrapper:\n\n```css\n:root {\n  --ndp-accent: #0f766e; /* primary accent (selected day, focus rings) */\n  --ndp-accent-strong: #115e59; /* hover accent */\n  --ndp-accent-soft: #ccfbf1; /* soft accent fills */\n  --ndp-accent-rgb: 15, 118, 110; /* accent as RGB triplet, for translucent shadows */\n  --ndp-text: #221f1a;\n  --ndp-muted: #5b6560;\n  --ndp-panel: #ffffff; /* calendar and input background */\n  --ndp-surface: #f6f5f2; /* hover surfaces */\n  --ndp-border: #e7e9ec;\n  --ndp-border-strong: #8a949e; /* input border */\n  --ndp-selected-text: #ffffff; /* text on the selected day */\n  --ndp-radius-sm: 8px;\n  --ndp-radius-md: 12px;\n  --ndp-font-family: Inter, ui-sans-serif, system-ui, sans-serif;\n}\n```\n\nA dark theme ships in the stylesheet — add `class=\"ndp-dark\"` or `data-ndp-theme=\"dark\"` to any\nancestor (e.g. `<html>`).\n\nFor deeper restyling, target the stable class names (kept backward compatible across releases):\n`ndp-input`, `ndp-input__control`, `ndp-input__field`, `ndp-input__button`, `ndp-input__popover`,\n`ndp-calendar`, `ndp-calendar__header`, `ndp-calendar__select`, `ndp-calendar__grid`,\n`ndp-calendar__week`, `ndp-calendar__weekday`, `ndp-calendar__day`, `ndp-calendar__footer`,\n`ndp-calendar__today`.\n\n## Forms\n\nGive the input a `name` and it renders a hidden input carrying the canonical ASCII\n`YYYY-MM-DD` value, so plain HTML form posts and server actions receive a stable value even\nwhen the visible input is localized to Devanagari digits. The hidden input respects `disabled`\nand `form`, so disabled fields are omitted and inputs can belong to a form outside their parent:\n\n```tsx\n<form action=\"/profile\" method=\"post\">\n  <NepaliDateInput name=\"dob\" locale=\"ne\" defaultValue={{ year: 2081, month: 1, day: 1 }} />\n</form>\n// posts dob=2081-01-01\n```\n\nWith `readOnly={false}`, typed text using ASCII or Devanagari digits is committed on Enter or blur — a normal submit-button\nclick blurs the field first, so the committed value is what posts. If you submit\nprogrammatically (`form.requestSubmit()`) while the field still has focus mid-edit, blur or\ncommit the field first.\n\nFor form libraries (react-hook-form, etc.), use the controlled `value`/`onChange` pair, or grab\nthe native input with the forwarded `ref`.\n\n## Next.js / SSR\n\nThe main entry ships a `\"use client\"` directive, so the components work in the App Router\nwithout wrappers. In Server Components, import utilities from\n`@arclogi/nepali-date-picker/core`. The components themselves render safely on the server\n(no `window` access during render).\n\n## Date range\n\nThe conversion engine supports BS 2000-01-01 through BS 2090-12-30 (AD 1943 – AD 2034).\nUtilities throw a `RangeError` outside that range; the calendar clamps navigation at the\nboundaries instead of crashing. Initial and controlled views also clamp to `minDate` / `maxDate`;\n`minDate` must be on or before `maxDate`.\nSelection bounds outside the supported years are clipped to the supported endpoints.\n\n## Development\n\n```sh\nnpm install\nnpm run lint\nnpm run typecheck\nnpm run test\nnpm run build\nnpm run typecheck:package\nnpm run demo:dev\n```\n\nThe build and ESLint tooling use TypeScript 6. Package compatibility is tested separately with\nthe latest TypeScript compiler; consumers do not need to use the build compiler's version.\n\n## Contributing\n\nContributions are welcome! The flow is the standard fork → feature branch → pull request; direct\npushes to `main` are disabled. See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide, local\nsetup, and project standards. For non-trivial changes, please open an issue first.\n\n## Roadmap\n\n- Date-range selection.\n- Optional portal rendering for the popover.\n\n## Conversion note\n\nThe package uses the MIT-licensed `nepali-date-converter` library for base AD/BS conversion\ndata and wraps it with a React-friendly, TypeScript-first API.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}