UNPKG

wix-style-react

Version:
52 lines (48 loc) 1.53 kB
import * as React from 'react'; import { CalendarProps } from '../Calendar'; import { PopoverCommonProps, TooltipCommonProps } 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 Omit<CalendarProps, 'size'> { className?: string; customInput?: React.ReactNode; inputProps?: {}; locale?: SupportedWixLocales; dateStyle?: 'short' | 'medium'; disabled?: boolean; inputDataHook?: string; calendarDataHook?: string; placeholderText?: string; rtl?: boolean; value?: Date; 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; validate?: boolean; onValidate?({ validationType, format, value, }: { format?: string; validationType: 'outOfBoundsError' | 'formatError' | 'valid'; value: string; }): void; clearButtonTooltipContent?: React.ReactNode; clearButtonTooltipProps?: TooltipCommonProps; onOpen?: Function; } export default class DatePicker extends React.PureComponent<DatePickerProps> { openCalendar: () => void; closeCalendar: () => void; }