UNPKG

@brightsoftware/date-np

Version:

Simple & minimal Nepali date picker that just works.

34 lines (33 loc) 1.02 kB
import React from "react"; declare const PickerInput: React.ForwardRefExoticComponent<{ label?: string; className?: string; required?: boolean; /** * default date for the picker * by default, the selected date is null */ defaultDate?: Date | import("../NepaliDate").NepaliDate; /** * format for the date input * @default ISO */ dateFormat?: string; /** * default mode for the picker * @default "ad" */ defaultLocale?: "AD" | "BS"; /** * Enable editable date input functionality * Allows users to type dates directly in ISO format (YYYY-MM-DD) * @default false */ editable?: boolean; /** * Callback function to register the clearError function * Used to clear validation errors when clicking outside the picker */ onRegisterClearError?: (clearErrorFn: () => void) => void; } & React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>; export default PickerInput;