/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { default as PropTypes } from 'prop-types'; import { FormComponent, FormComponentProps, FormComponentValidity, DateInputsClassStructure, AdaptiveModeContextType, WebMcpProps } from '@progress/kendo-react-common'; import { LocalizationService } from '@progress/kendo-react-intl'; import { DateInputHandle, DateInputProps } from '../dateinput/DateInput.js'; import { TimeSelector } from './TimeSelector.js'; import { TimePickerSettings } from './models/index.js'; import { DateInputCommonPackageProps } from '../dateinput/models/common-package-props'; import * as React from 'react'; /** * The arguments for the `onChange` event of the TimePicker. */ export interface TimePickerChangeEvent { /** The native DOM event. */ nativeEvent?: any; /** The React synthetic event. */ syntheticEvent: React.SyntheticEvent; /** The new `value`. */ value: Date | null; /** The current popup state. */ show: boolean; /** The component instance that fired the event. */ target: TimePicker; } /** * The arguments for the `onOpen` event of the TimePicker. */ export interface TimePickerOpenEvent { /** The component instance that fired the event. */ target: TimePicker; } /** * The arguments for the `onClose` event of the TimePicker. */ export interface TimePickerCloseEvent { /** The component instance that fired the event. */ target: TimePicker; } /** * Represents the props of the [KendoReact TimePicker component](https://www.telerik.com/kendo-react-ui/components/dateinputs/timepicker). */ export interface TimePickerProps extends TimePickerSettings, FormComponentProps, DateInputCommonPackageProps { /** * Sets the default value of the TimePicker ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/timepicker/default-value#toc-setting-the-default-value)). */ defaultValue?: Date | null; /** * Fires each time the user selects a new value ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/timepicker/controlled-state#toc-controlling-the-date-value)). */ onChange?: (event: TimePickerChangeEvent) => void; /** * Fires each time the popup is opened. */ onOpen?: (event: TimePickerOpenEvent) => void; /** * Fires each time the popup is closed. */ onClose?: (event: TimePickerCloseEvent) => void; /** * Specifies the value of the TimePicker ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/timepicker/controlled-state#toc-controlling-the-date-value)). * * > The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. */ value?: Date | null; /** * Configures the `size` of the TimePicker. * * The available options are: * - small * - medium * - large * * @default undefined (theme-controlled) * * @example * ```tsx * * ``` */ size?: 'small' | 'medium' | 'large'; /** * Configures the `roundness` of the TimePicker. * * The available options are: * - small * - medium * - large * - full * - none * * @default undefined (theme-controlled) * * @example * ```tsx * * ``` */ rounded?: 'small' | 'medium' | 'large' | 'full' | 'none'; /** * Configures the `fillMode` of the TimePicker. * * The available options are: * - solid * - outline * - flat * * @default undefined (theme-controlled) * * @example * ```tsx * * ``` */ fillMode?: 'solid' | 'flat' | 'outline'; /** * Providing different rendering of the popup element based on the screen dimensions. * * @default `false` */ adaptive?: boolean; /** * Specifies the text that is rendered as title in the adaptive popup(action sheet). * Applicable only when `adaptive` is set to `true`. * If not provided, the title will be the same as the label. */ adaptiveTitle?: string; /** * Specifies the text that is rendered as subtitle in the adaptive popup(action sheet). * Applicable only when `adaptive` is set to `true`. */ adaptiveSubtitle?: string; /** * Controls the Popup animation. * Set to `false` to disable animation. * * @default true */ animation?: boolean; /** * @hidden */ unstyled?: DateInputsClassStructure; /** * Indicates whether the mouse scroll can be used to increase/decrease the time segments values. * * @default `true` */ enableMouseWheel?: boolean; /** * Sets the HTML attributes of the inner focusable input element. * Attributes which are essential for certain component functionalities cannot be changed. * * @remarks * This property is related to accessibility. */ inputAttributes?: React.InputHTMLAttributes; /** * @hidden * This prop is provided by the withAdaptiveModeContext HOC to subscribe to AdaptiveModeContext. */ _adaptiveMode?: AdaptiveModeContextType; /** * Enables Web MCP tool registration for this component. * Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`. */ webMcp?: boolean | WebMcpProps; } /** * @hidden */ export interface TimePickerState { value: Date | null; show: boolean; focused: boolean; windowWidth?: number; candidate: Date | null; } /** @hidden */ export declare class TimePickerWithoutContext extends React.Component implements FormComponent { /** * @hidden */ static displayName: string; /** * @hidden */ static propTypes: { className: PropTypes.Requireable; cancelButton: PropTypes.Requireable; nowButton: PropTypes.Requireable; defaultShow: PropTypes.Requireable; defaultValue: PropTypes.Requireable; disabled: PropTypes.Requireable; format: PropTypes.Requireable; pattern: PropTypes.Requireable; date: PropTypes.Requireable; time: PropTypes.Requireable; datetime: PropTypes.Requireable; era: PropTypes.Requireable; year: PropTypes.Requireable; month: PropTypes.Requireable; day: PropTypes.Requireable; weekday: PropTypes.Requireable; hour: PropTypes.Requireable; hour12: PropTypes.Requireable; minute: PropTypes.Requireable; second: PropTypes.Requireable; timeZoneName: PropTypes.Requireable; }> | null | undefined>>; formatPlaceholder: PropTypes.Requireable; month: PropTypes.Requireable; day: PropTypes.Requireable; hour: PropTypes.Requireable; minute: PropTypes.Requireable; second: PropTypes.Requireable; }> | null | undefined>>; id: PropTypes.Requireable; ariaLabelledBy: PropTypes.Requireable; ariaLabel: PropTypes.Requireable; ariaDescribedBy: PropTypes.Requireable; min: PropTypes.Requireable; max: PropTypes.Requireable; name: PropTypes.Requireable; popupSettings: PropTypes.Requireable; appendTo: PropTypes.Requireable; popupClass: PropTypes.Requireable; }>>; dateInput: PropTypes.Requireable; show: PropTypes.Requireable; steps: PropTypes.Requireable; minute: PropTypes.Requireable; second: PropTypes.Requireable; }>>; smoothScroll: PropTypes.Requireable; tabIndex: PropTypes.Requireable; title: PropTypes.Requireable; value: PropTypes.Requireable; width: PropTypes.Requireable>; validationMessage: PropTypes.Requireable; required: PropTypes.Requireable; validate: PropTypes.Requireable; valid: PropTypes.Requireable; size: PropTypes.Requireable<"small" | "medium" | "large" | undefined>; rounded: PropTypes.Requireable<"small" | "none" | "medium" | "large" | "full" | undefined>; fillMode: PropTypes.Requireable<"flat" | "solid" | "outline" | undefined>; inputAttributes: PropTypes.Requireable; }; /** * @hidden */ static defaultProps: { defaultShow: boolean; defaultValue: null; disabled: boolean; format: string; max: Date; min: Date; popupSettings: {}; tabIndex: number; steps: {}; validityStyles: boolean; dateInput: React.ComponentType>; size: "small" | "medium" | "large" | undefined; rounded: "small" | "none" | "medium" | "large" | "full" | undefined; fillMode: "flat" | "solid" | "outline" | undefined; }; /** * @hidden */ readonly state: TimePickerState; private get _popupId(); private _element; private _dateInput; private _timeSelector; private valueDuringOnChange?; private showDuringOnChange?; private shouldFocusDateInput; private prevShow; private observerResize?; private get document(); private readonly showLicenseWatermark; private readonly licenseMessage?; private KendoPasteSubscription?; constructor(props: TimePickerProps); /** * Gets the wrapping element of the TimePicker. */ get element(): HTMLSpanElement | null; /** * Gets the DateInput component inside the TimePicker component. */ get dateInput(): DateInputHandle | null; /** * Gets the TimeSelector component inside the TimePicker component. */ get timeSelector(): TimeSelector | null; /** * Gets the value of the TimePicker. */ get value(): Date | null; /** * Gets the popup state of the TimeSelector. */ get show(): boolean; /** * Gets the `name` property of the TimePicker. */ get name(): string | undefined; /** * Represents the validity state into which the TimePicker is set. */ get validity(): FormComponentValidity; /** * Returns a boolean value indicating whether the TimePicker is in mobile mode. */ get mobileMode(): boolean; /** * @hidden */ protected get validityStyles(): boolean; /** * @hidden */ protected get required(): boolean; private get popupSettings(); private get min(); private get max(); protected get dateInputComp(): React.ComponentType>; protected get localizationService(): LocalizationService; /** * @hidden */ componentDidMount(): void; /** * @hidden */ componentDidUpdate(): void; /** * @hidden */ componentWillUnmount(): void; private readonly handleKendoPasteValue; private readonly applyKendoPasteTime; /** * @hidden */ focus: () => void; /** * @hidden */ render(): React.JSX.Element; private renderTimeSelector; private renderPopup; private renderAdaptivePopup; protected setTimeSelectorRef: (timeSelector: TimeSelector | null) => void; protected nextValue: (nextProps: TimePickerProps, nextState: TimePickerState) => Date | null; protected nextShow: (nextProps: TimePickerProps, nextState: TimePickerState) => boolean; protected normalizeTime(date: Date): Date; protected setShow(show: boolean): void; protected mergeTime(value: Date | null): Date | null; private handleInputValueChange; private handleTimeChange; private handleValueChange; private handleFocus; private handleBlur; private handleValueReject; private handleClick; private handleIconMouseDown; private handleKeyDown; private calculateMedia; } /** * Represents the PropsContext of the `TimePicker` component. * Used for global configuration of all `TimePicker` instances. * * For more information, refer to the [DateInputs Props Context](https://www.telerik.com/kendo-react-ui/components/dateinputs/props-context) article. */ export declare const TimePickerPropsContext: React.Context<(p: TimePickerProps) => TimePickerProps>; /** * Represent the `ref` of the TimePicker component. */ export interface TimePickerHandle extends Pick { /** * Gets the DateInput component inside the TimePicker component. */ dateInput: DateInputHandle | null; /** * Returns the HTML element of the TimePicker component. */ element: HTMLSpanElement | null; /** * Returns a boolean value indicating whether the TimePicker is in mobile mode. */ mobileMode: boolean; /** * Gets the `name` property of the TimePicker. */ name: string | undefined; /** * The props of the TimePickerHandle component. */ props: Readonly; /** * Gets the popup state of the TimeSelector. */ show: boolean; /** * Represents the validity state into which the TimePicker is set. */ validity: FormComponentValidity; /** * Gets the value of the TimePicker. */ value: Date | null; /** * Gets the TimeSelector component inside the TimePicker component. */ timeSelector: TimeSelector | null; } /** @hidden */ export type TimePicker = TimePickerHandle; /** * Represents the KendoReact TimePicker Component. * * Accepts properties of type [TimePicker](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/timepickerprops). * Obtaining the `ref` returns an object of type [TimePickerHandle](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/timepickerhandle). */ export declare const TimePicker: React.ForwardRefExoticComponent>;