import * as React from 'react'; import { Animated, StyleProp, TextStyle } from 'react-native'; interface IBaseProps { visible: boolean; format?: string; onDateChange: (dateStr?: string, date?: Date) => any; date: string | Date; maximumDate?: Date; minimumDate?: Date; } interface IIOSProps extends IBaseProps { mode: IOSMode; timeZoneOffsetInMinutes?: number; textColor?: string; locale?: string; minuteInterval?: MinuteInterval; confirmText?: string; cancelText?: string; confirmTextStyle?: StyleProp; cancelTextStyle?: StyleProp; } interface IAndroidProps extends IBaseProps { mode: AndroidMode; display?: Display; is24Hour?: boolean; } export declare type IProps = IIOSProps | IAndroidProps; export interface IDeafaultProps { mode: Mode; date: string | Date; confirmText: string; cancelText: string; } interface IState { visible: boolean; date: Date; animatedOpacity: Animated.Value; animatedTranslateY: Animated.Value; } declare type IOSMode = 'date' | 'datetime' | 'time' | 'countdown'; declare type AndroidMode = 'date' | 'time'; declare type Mode = IOSMode | AndroidMode; declare type MinuteInterval = 1 | 2 | 3 | 4 | 5 | 6 | 10 | 12 | 15 | 20 | 30 | undefined; declare type Display = 'default' | 'calendar' | 'spinner' | 'clock'; declare class DatePicker extends React.Component { static defaultProps: IDeafaultProps; readonly state: IState; constructor(props: IProps); render(): JSX.Element | null; UNSAFE_componentWillReceiveProps(nextProps: IProps): void; private _onDateChange; private _submitDate; private _cancelHandler; private _showDatePicker; private _hideDatePicker; /** @description show modal for ios */ private _showModal; /** @description hide modal for ios */ private _hideModal; private _animatedModal; } export declare function dateToStr(date: Date, format: string): string; export default DatePicker;