wix-style-react
Version:
43 lines (39 loc) • 1.32 kB
TypeScript
import * as React from 'react';
import { Locale } from 'date-fns';
import { CalendarProps } from '../Calendar';
import { PopoverCommonProps } from '../common';
import type { SupportedWixLocales } from 'wix-design-systems-locale-utils';
export type DatePickerStatus = 'error' | 'warning' | 'loading';
export { LanguageType } from '../Calendar';
export interface DatePickerProps extends CalendarProps {
className?: string;
customInput?: React.ReactNode;
inputProps?: {};
dateFormat?: string | Function;
dateFormatV2?: string | Function;
locale?: SupportedWixLocales | Locale;
dateStyle?: 'short' | 'medium';
disabled?: boolean;
inputDataHook?: string;
calendarDataHook?: string;
placeholderText?: string;
rtl?: boolean;
value?: {};
initialOpen?: boolean;
status?: DatePickerStatus;
statusMessage?: React.ReactNode;
width?: number | string;
zIndex?: number;
popoverProps?: PopoverCommonProps;
firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
size?: 'small' | 'medium' | 'large';
readOnly?: boolean;
clearButton?: boolean;
onClear?: React.MouseEventHandler<HTMLInputElement>;
disableKeyboardType?: boolean;
}
export default class DatePicker extends React.PureComponent<DatePickerProps> {
openCalendar: () => void;
closeCalendar: () => void;
makeInputFocusable: () => void;
}