Simal UI
Components

DatePicker

Import

import { DatePicker } from '@simal/ui/nativewindui';

Props

PropValuesDefaultDescription
calendarad · bs · bothWhich calendar the grid shows. both renders Bikram Sambat with the Gregorian date alongside. The value is always a JS Date regardless — conversion happens for display only.
valueSelected date, always Gregorian. Controlled — hold it in state and update from onChange.
onChangeFires with the new Date. In BS mode you still receive Gregorian, so no conversion is needed on your side.
minimumDateEarliest selectable date. Out-of-range days render disabled rather than being hidden.
maximumDateLatest selectable date.

Examples

Bikram Sambat Only

Locked to Bikram Sambat — the AD/BS toggle is hidden.

Gregorian Only

Locked to Gregorian, for fields that are explicitly AD.

With Default Date

defaultDate sets where the calendar opens — useful for date of birth, where today is never the right starting point. The web implementation also accepts value: null for a genuinely empty field; the shared (native) prop type does not, so this story seeds a value instead.

Bounded

minimumDate / maximumDate bound the selectable range.

On this page