import { ClockPickerView } from '@mui/x-date-pickers'; import { TimeValidationError } from '@mui/x-date-pickers/internals/hooks/validation/useTimeValidation'; import { Dayjs } from 'dayjs'; import { TextFieldProps } from '../../../../../tedi/components/form/textfield/textfield'; export type TimePickerValue = Dayjs | null; /** * @deprecated Use `TimeField` from `@tedi-design-system/react/tedi` instead. */ export interface TimePickerProps extends Omit { /** * TimePicker initial value. Accepts a dayjs date object. */ defaultValue?: TimePickerValue; /** * Currently selected value. Accepts a dayjs date object. * Used only if onChange is also defined */ value?: TimePickerValue; /** * onChange handler. * Triggers each time when new value is selected from TimePicker. */ onChange?: (value: TimePickerValue) => void; /** * Format string. * @default HH:mm */ inputFormat?: string; /** * Mobile picker title, displaying in the toolbar. Default from LabelProvider */ toolbarTitle?: string; /** * Max time acceptable time. For input validation date part of passed object will be ignored. */ maxTime?: TimePickerValue; /** * Min time acceptable time. For input validation date part of passed object will be ignored. */ minTime?: TimePickerValue; /** * Step over minutes. * @default 1 */ minutesStep?: number; /** * Callback that fired when input value or new value prop validation returns new validation error (or value is valid after error). * In case of validation error detected reason prop return non-null value and TextField must be displayed in error state. * This can be used to render appropriate form error. * Read the guide about form integration and error displaying (https://next.material-ui-pickers.dev/guides/forms). */ onError?: (reason: TimeValidationError, value: TimePickerValue) => void; /** * Dynamically check if time is disabled or not. If returns false appropriate time point will ot be acceptable. * timeValue: The value to check. * clockType: The clock type of the timeValue. * returns (boolean): Returns true if the time should be disabled */ shouldDisableTime?: (timeValue: number, clockType: ClockPickerView) => boolean; /** * Array of views to show. * @default ['hours', 'minutes'] */ views?: Array<'hours' | 'minutes' | 'seconds'>; /** * 12h/24h view for hour selection clock. * @default false */ ampm?: boolean; /** * Callback fired when the popup requests to be closed. */ onClose?: () => void; } /** * @deprecated Use `TimeField` from `@tedi-design-system/react/tedi` instead. */ export declare const TimePicker: (props: TimePickerProps) => JSX.Element; export default TimePicker;