This is placeholder v2 documentation. Replace this page with version-specific content when ready.
V2 Date Picker
The DatePicker pattern is useful when you need a compact form input instead of a full calendar surface.
Usage
import { DatePicker } from 'nepali-bs-calendar-react'
export function Demo() {
return <DatePicker placeholder="Select date" />
} Preview
TSXimport { DatePicker } from 'nepali-bs-calendar-react'
export default function Demo() {
return <DatePicker placeholder="Select BS date" onChange={(value) => console.log(value)} />
}Configuration
| Prop | Type | Description |
|---|---|---|
value | NepaliDateValue | Controlled value. |
defaultValue | NepaliDateValue | Initial value. |
placeholder | string | Input placeholder. |
onChange | (value) => void | Date selection callback. |
disabled | boolean | Prevent user interaction. |
className | string | Custom class for styling. |
Examples
Form field
<label htmlFor="dob">Date of Birth</label>
<DatePicker id="dob" placeholder="YYYY-MM-DD" />With validation state
<DatePicker className="border-destructive" aria-invalid="true" />