@fk6/react-datepicker
Version:
React date picker with Hijri & Gregorian support, theming, localization, and more.
30 lines • 1.24 kB
TypeScript
import { Moment } from 'moment-hijri';
import { default as React, ComponentProps } from 'react';
import { CalendarsEnum, ThemesEnum } from '../../utils/enums.js';
import { CalendarProps } from '../Calendar/index.js';
import { DateFieldExtraProps, DateFieldProps } from '../DateField/index.js';
export interface DatePickerProps extends Omit<ComponentProps<'div'>, 'defaultValue' | 'onChange'> {
value?: Date | Moment | null;
defaultValue?: Date | Moment | null;
open?: boolean;
format?: string;
placeholder?: string;
minDate?: Date | Moment;
maxDate?: Date | Moment;
locale?: string;
disabled?: boolean;
readOnly?: boolean;
closeOnSelect?: boolean;
name?: string;
calendar?: `${CalendarsEnum}`;
initialDate?: Date | Moment;
theme?: `${ThemesEnum}`;
calendarProps?: Partial<Omit<CalendarProps, "timePickerProps">>;
fieldProps?: Partial<DateFieldProps>;
renderInput?: (dateFieldProps: DateFieldExtraProps) => React.ReactNode;
renderCalendar?: (props: CalendarProps) => React.ReactNode;
onChange?: (date: Date | null) => void;
onOpenChange?: (open: boolean) => void;
}
export declare const DatePicker: React.FC<DatePickerProps>;
//# sourceMappingURL=index.d.ts.map