logo
DocsDate Picker

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

PropTypeDescription
valueNepaliDateValueControlled value.
defaultValueNepaliDateValueInitial value.
placeholderstringInput placeholder.
onChange(value) => voidDate selection callback.
disabledbooleanPrevent user interaction.
classNamestringCustom 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" />