pick-datetime-react
Version:
Datetime picker for React
21 lines (20 loc) • 767 B
TypeScript
import { Dispatch, FC, SetStateAction } from 'react';
export declare type WeekDays = 'Sun' | 'Mon' | 'Tue' | 'Wed' | 'Thu' | 'Fri' | 'Sat';
declare type Props = {
today: Date;
minDate: Date | undefined;
maxDate: Date | undefined;
weekEnds: WeekDays[] | undefined;
selectedDate: Date;
isCalendarOpen: boolean;
setIsCalendarOpen: Dispatch<SetStateAction<boolean>>;
handleDateChange: (date: Date) => void;
handleNextMonth: () => void;
handlePrevMonth: () => void;
};
export declare type ProviderProps = {
value?: Date;
} & Partial<Pick<Props, 'today' | 'minDate' | 'maxDate' | 'weekEnds'>>;
export declare const DateProvider: FC<ProviderProps>;
export declare const useDateContext: () => Props;
export {};