UNPKG

@brightsoftware/date-np

Version:

Simple & minimal Nepali date picker that just works.

16 lines (15 loc) 737 B
import { NepaliDate } from '../NepaliDate'; export interface UseEditableDateInputReturn { isValidInput: (input: string) => boolean; parseInputToDate: (input: string, targetType: 'date' | 'nepali') => Date | NepaliDate | null; handleInputChange: (input: string, targetType: 'date' | 'nepali') => void; error: string | null; clearError: () => void; } export interface UseEditableDateInputProps { onDateChange: (date: Date | NepaliDate | null) => void; minDate?: Date | NepaliDate; maxDate?: Date | NepaliDate; currentDate?: Date | NepaliDate | null; } export declare const useEditableDateInput: ({ onDateChange, minDate, maxDate, currentDate }: UseEditableDateInputProps) => UseEditableDateInputReturn;