/** * @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 { DateInputHandle, DateInputProps } from '../dateinput/DateInput.js'; import { DateTimePickerSettings } 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 DateTimePicker. */ export interface DateTimePickerChangeEvent { /** 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: DateTimePicker; } /** * The arguments for the `onOpen` event of the DateTimePicker. */ export interface DateTimePickerOpenEvent { /** The component instance that fired the event. */ target: DateTimePicker; } /** * The arguments for the `onClose` event of the DateTimePicker. */ export interface DateTimePickerCloseEvent { /** The component instance that fired the event. */ target: DateTimePicker; } /** * Represents the props of the [KendoReact DateTimePicker component](https://www.telerik.com/kendo-react-ui/components/dateinputs/datetimepicker). */ export interface DateTimePickerProps extends DateTimePickerSettings, FormComponentProps, DateInputCommonPackageProps { /** * Set the initial `value` when uncontrolled ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/datetimepicker/default-value)). * See also [uncontrolled components](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components). */ defaultValue?: Date | null; /** * Fires when the user selects a new `value` ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/datetimepicker/controlled-state#toc-controlling-the-date-value)). */ onChange?: (event: DateTimePickerChangeEvent) => void; /** * Fires when the popup opens. */ onOpen?: (event: DateTimePickerOpenEvent) => void; /** * Fires when the popup closes. */ onClose?: (event: DateTimePickerCloseEvent) => void; /** * Set the current `value` ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/datetimepicker/controlled-state#toc-controlling-the-date-value)). * Provide a valid `Date` or `null`. */ value?: Date | null; /** * Control the `size` of the DateTimePicker. * * The available options are: * - small * - medium * - large * * @default undefined (theme-controlled) * * @example * ```tsx * * ``` */ size?: 'small' | 'medium' | 'large'; /** * Control the corner `rounded` style of the DateTimePicker. * * The available options are: * - small * - medium * - large * - full * - none * * @default undefined (theme-controlled) * * @example * ```tsx * * ``` */ rounded?: 'small' | 'medium' | 'large' | 'full' | 'none'; /** * Control the `fillMode` (background) of the DateTimePicker. * * The available options are: * - solid * - outline * - flat * * @default undefined (theme-controlled) * * @example * ```tsx * * ``` */ fillMode?: 'solid' | 'flat' | 'outline'; /** * Enable adaptive popup rendering based on viewport width. * * @default `false` */ adaptive?: boolean; /** * Set the title text in the adaptive popup (action sheet). Use only when `adaptive` is `true`. * If not set, it matches the `label`. */ adaptiveTitle?: string; /** * Set the subtitle text in the adaptive popup (action sheet). Use only when `adaptive` is `true`. */ adaptiveSubtitle?: string; /** * Apply the `autoFocus` attribute to the internal input. * * @default `false` * * @remarks * This property is related to accessibility. */ autoFocus?: boolean; /** * @hidden */ unstyled?: DateInputsClassStructure; /** * Autofill missing date or time parts with the current date/time on blur. * * @default `false` */ autoFill?: boolean; /** * Set the upper threshold for interpreting a two-digit year as part of the current century ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/dateinput/formats#toc-two---digit-year-max)). * Values smaller than (`twoDigitYearMax` + 1) map to 20xx. Larger map to 19xx. * * @default `68` */ twoDigitYearMax?: number; /** * Enable mouse wheel to increment or decrement segments. * * @default `true` */ enableMouseWheel?: boolean; /** * Pass HTML attributes to the internal focusable input. * Attributes required for core logic are ignored. * * @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 DateTimePickerState { value: Date | null; show: boolean; focused: boolean; windowWidth?: number; } /** @hidden */ export declare class DateTimePickerWithoutContext extends React.Component implements FormComponent { /** * @hidden */ static displayName: string; /** * @hidden */ static propTypes: { className: PropTypes.Requireable; defaultShow: PropTypes.Requireable; defaultValue: PropTypes.Requireable; disabled: PropTypes.Requireable; focusedDate: 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; tabIndex: PropTypes.Requireable; title: PropTypes.Requireable; value: PropTypes.Requireable; weekNumber: PropTypes.Requireable; width: PropTypes.Requireable>; validationMessage: PropTypes.Requireable; required: PropTypes.Requireable; validate: PropTypes.Requireable; valid: PropTypes.Requireable; cancelButton: 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>; autoFocus: PropTypes.Requireable; inputAttributes: PropTypes.Requireable; }; /** * @hidden */ static defaultProps: { defaultShow: boolean; defaultValue: null; disabled: boolean; format: string; max: Date; min: Date; popupSettings: {}; tabIndex: number; weekNumber: boolean; validityStyles: boolean; cancelButton: boolean; dateInput: React.ComponentType>; size: "small" | "medium" | "large" | undefined; rounded: "small" | "none" | "medium" | "large" | "full" | undefined; fillMode: "flat" | "solid" | "outline" | undefined; autoFocus: boolean; }; /** * @hidden */ readonly state: DateTimePickerState; private get _popupId(); private _element; private _dateInput; private _dateTimeSelector; private valueDuringOnChange?; private showDuringOnChange?; private nextTickId; private shouldFocusDateInput; private prevShow; private observerResize?; private KendoPasteSubscription?; private get document(); constructor(props: DateTimePickerProps); /** * Gets the wrapping element of the DateTimePicker. */ get element(): HTMLSpanElement | null; /** * Gets the DateInput component inside the DateTimePicker component. */ get dateInput(): DateInputHandle | null; /** * Gets the value of the DateTimePicker. */ get value(): Date | null; /** * Gets the popup state of the DateTimePicker. */ get show(): boolean; /** * Gets the `name` property of the DateTimePicker. */ get name(): string | undefined; /** * Returns a boolean value indicating whether the DateTimePicker is in mobile mode. */ get mobileMode(): boolean; protected get min(): Date; protected get max(): Date; /** * Represents the validity state into which the DateTimePicker is set. */ get validity(): FormComponentValidity; /** * @hidden */ protected get validityStyles(): boolean; /** * @hidden */ protected get required(): boolean; /** * @hidden */ protected get dateInputComp(): React.ComponentType>; /** * @hidden */ componentDidMount(): void; /** * @hidden */ componentDidUpdate(): void; /** * @hidden */ componentWillUnmount(): void; private handleSmartPasteValue; private applyKendoPasteDate; /** * @hidden */ focus: () => void; /** * @hidden */ render(): React.JSX.Element; private renderPicker; private renderAdaptivePopup; protected setShow(show: boolean): void; protected nextTick(f: () => any): void; private handleReject; private handleValueChange; private handleFocus; private handleBlur; private handleClick; private handleIconMouseDown; private handleKeyDown; private dateInputElement; private calculateMedia; } /** * Represents the PropsContext of the `DateTimePicker` component. * Used for global configuration of all `DateTimePicker` 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 DateTimePickerPropsContext: React.Context<(p: DateTimePickerProps) => DateTimePickerProps>; /** * Represent the `ref` of the DateTimePicker component. */ export interface DateTimePickerHandle extends Pick { /** * Gets the DateInput component inside the DateTimePicker component. */ dateInput: DateInputHandle | null; /** * Returns the HTML element of the DateTimePicker component. */ element: HTMLSpanElement | null; /** * Returns a boolean value indicating whether the DateTimePicker is in mobile mode. */ mobileMode: boolean; /** * Gets the `name` property of the DateTimePicker. */ name: string | undefined; /** * The props of the DateTimePickerHandle component. */ props: Readonly; /** * Gets the popup state of the DateTimePicker. */ show: boolean; /** * Represents the validity state into which the DateTimePicker is set. */ validity: FormComponentValidity; /** * Gets the value of the DateTimePicker. */ value: Date | null; } /** @hidden */ export type DateTimePicker = DateTimePickerHandle; /** * Represents the KendoReact DateTimePicker Component. * * Accepts properties of type [DateTimePickerProps](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/datetimepickerprops). * Obtaining the `ref` returns an object of type [DateTimePickerHandle](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/datetimepickerhandle). */ export declare const DateTimePicker: React.ForwardRefExoticComponent>;