import React from "react"; import { Moment } from "moment"; import { TempusDominus } from "@eonasdan/tempus-dominus"; import "@eonasdan/tempus-dominus/dist/css/tempus-dominus.css"; /** Applies a tested Tempus Dominus locale to a picker instance. */ export declare function applyTempusDominusLocale(control: TempusDominus, locale?: string): void; /** Props for DateTimePickerComponent. */ export interface DateTimePickerComponentProps { /** Moment.js date format. */ format?: string; /** True to show timepicker. Only used when no format is specified. */ timepicker?: boolean; /** Show the today button. */ showTodayButton?: boolean; /** Show the clear button. */ showClear?: boolean; /** Callback on date change. */ onChange: (date: Moment | null) => void; /** Called when a key is pressed in the input. */ onKeyDown?: (e: React.KeyboardEvent) => void; /** Date as moment. */ date?: Moment | null; /** Placeholder for the text input. */ placeholder?: string; /** Locale code. Only tested locales are enabled. */ locale?: string; /** True to disable the picker. */ disabled?: boolean; } /** Shared Tempus Dominus based date/time picker. */ export default class DateTimePickerComponent extends React.Component { static defaultProps: { timepicker: boolean; showClear: boolean; }; private control; private container; private textRef; /** Focuses the text input. */ focus(): void; /** Gets the Moment.js format used for display and parsing. */ getFormat(): string; componentDidUpdate(prevProps: DateTimePickerComponentProps): void; /** True when picker display options changed and the Tempus control must be recreated. */ private pickerOptionsChanged; /** Gets the currently selected moment from the Tempus control. */ private getCurrentMoment; /** The `date` prop, treating an invalid moment as no date. Tempus cannot render an Invalid Date. */ private getPropDate; /** Syncs the Tempus control selection from the controlled `date` prop. */ private syncDateFromProps; /** Creates the underlying Tempus Dominus control. */ private createControl; /** Disposes the underlying Tempus Dominus control. */ private disposeControl; private inputRef; render(): import("react/jsx-runtime").JSX.Element; }