This is placeholder v2 documentation. Replace this page with version-specific content when ready.
V2 API Reference
This page documents the public API shape used throughout the examples. Adjust the final names to match your package exports if needed.
Props
| Name | Type | Required | Description |
|---|---|---|---|
value | NepaliDateValue | No | Controlled selected value. |
defaultValue | NepaliDateValue | No | Initial selected value. |
onChange | (value: NepaliDateValue) => void | No | Fired after selecting a date. |
minDate | string | No | Minimum selectable date in BS format. |
maxDate | string | No | Maximum selectable date in BS format. |
disabled | boolean | No | Disables the component. |
className | string | No | Adds custom CSS classes. |
locale | 'en' | 'ne' | No | Controls display language. |
Methods
| Method | Parameters | Returns | Description |
|---|---|---|---|
onChange | value | void | Called when selection changes. |
onMonthChange | month | void | Called when visible month changes. |
onYearChange | year | void | Called when visible year changes. |
Types
export type NepaliDateValue =
| string
| Date
| {
year: number
month: number
day: number
}
export type CalendarProps = {
value?: NepaliDateValue
defaultValue?: NepaliDateValue
onChange?: (value: NepaliDateValue) => void
minDate?: string
maxDate?: string
disabled?: boolean
className?: string
locale?: 'en' | 'ne'
}Import patterns
import { Calendar, DatePicker } from 'nepali-bs-calendar-react'