@amaui/ui-react
Version:
UI for React
62 lines (61 loc) • 2.25 kB
TypeScript
import React from 'react';
import { AmauiDate } from '@amaui/date';
import { IAdvancedTextField } from '../AdvancedTextField/AdvancedTextField';
import { TCalendarMonthValue } from '../CalendarMonth/CalendarMonth';
import { TCalendarUnit } from '../Calendar/Calendar';
import { TClockUnit } from '../Clock/Clock';
import { ITonal, IColor, IValueBreakpoints, IElementReference, IPropsAny } from '../types';
export type TDateTimePicker = AmauiDate;
export interface IDateTimePicker extends Omit<IAdvancedTextField, 'version'> {
tonal?: ITonal;
color?: IColor;
version?: 'auto' | 'mobile' | 'desktop';
value?: TCalendarMonthValue;
valueDefault?: TCalendarMonthValue;
onChange?: (value: TCalendarMonthValue) => any;
now?: boolean;
range?: boolean;
static?: boolean;
valid?: (value: AmauiDate, version: TCalendarUnit | TClockUnit) => boolean;
validate?: (value: AmauiDate) => boolean;
min?: AmauiDate;
max?: AmauiDate;
headingText?: string;
headingTextTime?: string;
headingTextTimeRange?: string;
headingTextDate?: string;
headingTextDateRange?: string;
useHelperText?: boolean | Partial<Record<IValueBreakpoints, boolean>>;
format?: '12' | '24';
hour?: boolean;
minute?: boolean;
second?: boolean;
today?: boolean;
clear?: boolean;
placeholder?: string;
fullWidth?: boolean;
readOnly?: boolean;
disabled?: boolean;
onClose?: (event: React.MouseEvent<any>) => any;
onCancel?: (event: React.MouseEvent<any>) => any;
onToday?: (event: React.MouseEvent<any>) => any;
onClear?: (event: React.MouseEvent<any>) => any;
onOk?: (event: React.MouseEvent<any>) => any;
Icon?: IElementReference;
IconDate?: IElementReference;
IconTime?: IElementReference;
WrapperProps?: IPropsAny;
ModalProps?: IPropsAny;
TooltipProps?: IPropsAny;
AdvancedTextFieldProps?: IPropsAny;
DatePickerProps?: IPropsAny;
TimePickerProps?: IPropsAny;
IconButtonProps?: IPropsAny;
ButtonProps?: IPropsAny;
PickerProps?: IPropsAny;
MiddleProps?: IPropsAny;
MainProps?: IPropsAny;
IconProps?: IPropsAny;
}
declare const DateTimePicker: React.FC<IDateTimePicker>;
export default DateTimePicker;