/** * @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 { AdaptiveModeContextType, WebMcpProps } from '@progress/kendo-react-common'; import { DateInputHandle, DateInputProps } from '../dateinput/DateInput.js'; import { MultiViewCalendar, MultiViewCalendarHandle } from '../calendar/components/MultiViewCalendar.js'; import { SelectionRange } from '../calendar/models/index.js'; import { DateRangePickerSettings } from './models/index.js'; import * as React from 'react'; /** * @hidden */ export interface ReverseClickEvent { syntheticEvent: React.SyntheticEvent; nativeEvent?: any; } /** * The arguments for the `onChange` event of the DateRangePicker. */ export interface DateRangePickerChangeEvent { /** The React synthetic event. */ syntheticEvent: React.SyntheticEvent; /** The native DOM event. */ nativeEvent?: any; /** The new selection `value`. */ value: SelectionRange; /** The current popup state. */ show?: boolean; /** The component instance that fired the event. */ target: DateRangePicker; } /** * The arguments for the `onOpen` event of the DateRangePicker. */ export interface DateRangePickerOpenEvent { /** The component instance that fired the event. */ target: DateRangePicker; } /** * The arguments for the `onClose` event of the DateRangePicker. */ export interface DateRangePickerCloseEvent { /** The component instance that fired the event. */ target: DateRangePicker; } /** * Represents the props of the [KendoReact DateRangePicker component](https://www.telerik.com/kendo-react-ui/components/dateinputs/daterangepicker). */ export interface DateRangePickerProps extends DateRangePickerSettings { /** * Override the validity state. * If `valid` is set, ignore `required`. * Part of [FormComponentProps](https://www.telerik.com/kendo-react-ui/components/common/api/formcomponentprops). */ valid?: boolean; /** * Set the initial `value` when uncontrolled ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/daterangepicker/default-value)). */ defaultValue?: SelectionRange; /** * Fires when the user changes part of the range ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/daterangepicker/controlled-state#toc-controlling-the-value)). */ onChange?: (event: DateRangePickerChangeEvent) => void; /** * Fires when the popup opens. */ onOpen?: (event: DateRangePickerOpenEvent) => void; /** * Fires when the popup closes. */ onClose?: (event: DateRangePickerCloseEvent) => void; /** * Fires when the popup is about to cancel in ([adaptive mode](https://www.telerik.com/kendo-react-ui/components/dateinputs/daterangepicker/adaptive-rendering)). */ onCancel?: (event: React.MouseEvent) => void; /** * Set the selected range ([see example](https://www.telerik.com/kendo-react-ui/components/dateinputs/daterangepicker/controlled-state#toc-controlling-the-value)). * Provide `start` and `end` valid `Date` values or `null`. */ value?: SelectionRange; /** * 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; /** * Show a clear button for start and end inputs. Clicking resets the range and fires `onChange`. */ clearButton?: boolean; /** * Apply the `autoFocus` attribute to the first input. * * @default `false` * * @remarks * This property is related to accessibility. */ autoFocus?: boolean; /** * @hidden */ dir?: string; /** * Pass HTML attributes to the internal focusable input elements. * 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 DateRangePickerState { show: boolean; value: SelectionRange; windowWidth?: number; currentValue: SelectionRange; } /** @hidden */ export declare class DateRangePickerWithoutContext extends React.Component { /** * @hidden */ static displayName: string; /** * @hidden */ static propTypes: { allowReverse: PropTypes.Requireable; calendarSettings: PropTypes.Requireable; className: PropTypes.Requireable; defaultShow: PropTypes.Requireable; defaultValue: PropTypes.Validator; disabled: PropTypes.Requireable; endDateInputSettings: 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>>; id: PropTypes.Requireable; ariaLabelledBy: PropTypes.Requireable; ariaDescribedBy: PropTypes.Requireable; max: PropTypes.Requireable; min: PropTypes.Requireable; onBlur: PropTypes.Requireable<(...args: any[]) => any>; onChange: PropTypes.Requireable<(...args: any[]) => any>; onFocus: PropTypes.Requireable<(...args: any[]) => any>; popupSettings: PropTypes.Requireable; show: PropTypes.Requireable; startDateInputSettings: PropTypes.Requireable; style: PropTypes.Requireable; swapButton: PropTypes.Requireable; tabIndex: PropTypes.Requireable; dir: PropTypes.Requireable; value: PropTypes.Validator; autoFocus: PropTypes.Requireable; inputAttributes: PropTypes.Requireable; }; /** * @hidden */ static defaultProps: { allowReverse: boolean; defaultShow: boolean; defaultValue: SelectionRange; disabled: boolean; format: string; max: Date; min: Date; swapButton: boolean; autoFocus: boolean; }; private _element; private _calendar; private _startDateInput; private _endDateInput; private valueDuringOnChange?; private showDuringOnChange?; private nextTickId; private get _popupId(); private get _startInputId(); private get _endInputId(); private shouldFocusDateInput; private shouldFocusCalendar; private observerResize?; private readonly showLicenseWatermark; private readonly licenseMessage?; constructor(props: DateRangePickerProps); /** * Gets the wrapping element of the DateRangePicker. */ get element(): HTMLSpanElement | null; /** * Gets the start DateInput component inside the DatePicker component. */ get startDateInput(): DateInputHandle | null; /** * Gets the end DateInput component inside the DatePicker component. */ get endDateInput(): DateInputHandle | null; /** * Gets the MultiVieCalendar inside the DateRangePicker. */ get calendar(): MultiViewCalendar | null; /** * Gets the value of the DateRangePicker. */ get value(): SelectionRange; /** * Gets the popup state of the DateRangePicker. */ /** * Whether the popup of the DateRangePicker is currently open. */ get show(): boolean; protected get min(): Date; protected get max(): Date; private get document(); private get localizationService(); /** * The mobile mode of the DateRangePicker. */ get mobileMode(): boolean; /** * @hidden */ componentDidMount(): void; /** * @hidden */ componentDidUpdate(): void; /** * @hidden */ componentWillUnmount(): void; /** * @hidden */ focus: () => void; /** * @hidden */ render(): React.JSX.Element; protected setCalendarRef: (calendar: MultiViewCalendarHandle | null) => void; protected focusCalendarElement: () => void; protected focusDateInputElement(): void; protected calculateValue: (props: DateRangePickerProps, state: DateRangePickerState) => SelectionRange; protected calculateShow: (nextProps: DateRangePickerProps, nextState: DateRangePickerState) => boolean; protected nextTick(f: () => any): void; protected setShow(show: boolean): void; private renderCalendar; private renderPopup; private renderAdaptivePopup; private handleReverseClick; private handleReverseMouseDown; private handleFocus; private handleClick; private handleBlur; private handleCancel; private handleEndChange; private handleStartChange; private extractRangeFromValue; private handleCalendarChange; private handleKeyDown; private handleChange; private calculateMedia; } /** * Represents the PropsContext of the `DateRangePicker` component. * Used for global configuration of all `DateRangePicker` 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 DateRangePickerPropsContext: React.Context<(p: DateRangePickerProps) => DateRangePickerProps>; /** * Represent the `ref` of the DateRangePicker component. */ export interface DateRangePickerHandle extends Pick { /** * Gets the MultiVieCalendar inside the DateRangePicker. */ calendar: MultiViewCalendar | null; /** * Returns the HTML element of the DateRangePicker component. */ element: HTMLSpanElement | null; /** * Gets the end DateInput component inside the DateRangePicker component. */ endDateInput: DateInputHandle | null; /** * Returns a boolean value indicating whether the DateRangePicker is in mobile mode. */ mobileMode: boolean; /** * The props of the DateRangePickerHandle component. */ props: Readonly; /** * Whether the popup of the DateRangePicker is currently open. */ show: boolean; /** * Gets the start DateInput component inside the DateRangePicker component. */ startDateInput: DateInputHandle | null; /** * Gets the value of the DateRangePicker. */ value: SelectionRange; } /** @hidden */ export type DateRangePicker = DateRangePickerHandle; /** * Represents the KendoReact DateRangePicker Component. * * Accepts properties of type [DateRangePickerProps](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/daterangepickerprops). * Obtaining the `ref` returns an object of type [DateRangePickerHandle](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/daterangepickerhandle). */ export declare const DateRangePicker: React.ForwardRefExoticComponent>;