import PropTypes from 'prop-types'; import React from 'react'; import { ConfigContext } from '../configProvider'; import { IAccessibilityPropTypes } from '../../utils/accessibility-helper'; interface MHDatePickerProps { type: 'single' | 'time24' | 'time12' | 'date'; singleType: 'month' | 'day' | 'hour' | 'minute' | 'second'; animationType: 'slide' | 'fade' | 'none'; visible: boolean; title: string; showSubtitle: boolean; confirmColor: string; current: Array | Array | Date; min: Array | Array | Date; max: Array | Array | Date; onSelect: (result: { rawArray: Array; rawString: string; data: Date; }) => void; onDismiss: () => void; accessible: IAccessibilityPropTypes['accessible']; accessibilityLabel: IAccessibilityPropTypes['accessibilityLabel']; accessibilityHint: IAccessibilityPropTypes['accessibilityHint']; isTimePoint: boolean; } interface MHDatePickerState { visible: boolean; currentArray: Array; dataSourceArray: Array>; subtitle: string; } declare class MHDatePicker extends React.Component { static contextType: React.Context & { theme: import("../../styles/themes/ITheme").default; }>; context: React.ContextType; static propTypes: { animationType: PropTypes.Requireable; visible: PropTypes.Requireable; title: PropTypes.Requireable; showSubtitle: PropTypes.Requireable; confirmColor: PropTypes.Requireable; type: PropTypes.Requireable; singleType: PropTypes.Requireable; current: PropTypes.Validator; min: PropTypes.Requireable; max: PropTypes.Requireable; datePickerStyle: PropTypes.Requireable; onSelect: PropTypes.Requireable<(...args: any[]) => any>; onDismiss: PropTypes.Requireable<(...args: any[]) => any>; accessible: PropTypes.Requireable; accessibilityLabel: PropTypes.Requireable; accessibilityHint: PropTypes.Requireable; isTimePoint: PropTypes.Requireable; }; static defaultProps: { animationType: string; visible: boolean; title: string; showSubtitle: boolean; confirmColor: string; type: string; singleType: string; datePickerStyle: { unlimitedHeightEnable: boolean; allowFontScaling: boolean; titleNumberOfLines: number; subTitleNumberOfLines: number; titleStyle: null; subTitleStyle: null; leftButtonNumberOfLines: number; rightButtonNumberOfLines: number; leftButtonStyle: null; rightButtonStyle: null; rightButtonBgStyle: null; leftButtonBgStyle: null; }; onSelect: () => void; accessible: boolean; isTimePoint: boolean; }; static TYPE: { SINGLE: string; TIME24: string; TIME12: string; DATE: string; }; static SINGLE_TYPE: { MONTH: string; DAY: string; HOUR: string; MINUTE: string; SECOND: string; }; constructor(props: MHDatePickerProps, context: React.ContextType); private colorDatePickerSelectBg; getSubtitle(arr: any, context: React.ContextType): any; convert(cur: Date | Array, context: React.ContextType): Array; convertTo12(arr: any, context: React.ContextType): any[]; slice(arr: Array, head: number, tail: number): Array; getYears(min: any, max: any, context: any): string[]; generateArray(min: any, max: any): string[]; init(props: any, context: React.ContextType): { currentArray: string[]; dataSourceArray: string[][]; }; UNSAFE_componentWillReceiveProps(newProps: MHDatePickerProps): void; private checkUnlimitedHeightEnable; renderTitle(): JSX.Element; renderContent(): JSX.Element; renderButton(): JSX.Element; render(): JSX.Element; updateDays(newCurrentArray: any, newDataSourceArray: any): void; _onValueChanged(index: any, data: any): void; dismiss(): void; array2Date(): Date | null; confirm(): void; } export default MHDatePicker;