/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { DateInputsClassStructure, WebMcpProps } from '@progress/kendo-react-common'; import { CalendarViewEnum, ActiveView, CalendarSettings } from '../models/index.js'; import * as React from 'react'; /** * The arguments for the `change` event of the Calendar. The generic argument sets the target type of the event. Defaults to `Calendar`. */ export interface CalendarChangeEvent { /** * A native DOM event. */ nativeEvent?: any; /** * A React Synthetic Event. */ syntheticEvent: React.SyntheticEvent; /** * The new value. */ value: Date; /** * The Calendar element. */ target: T; } /** * Represents the props of the [KendoReact Calendar component](https://www.telerik.com/kendo-react-ui/components/dateinputs/calendar). The generic argument is passed to the `onChange` property and is used as a target in the [`CalendarChangeEvent`](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/calendarchangeevent) interface. */ export interface CalendarProps extends CalendarSettings { /** @hidden */ _ref?: (instance: { element: HTMLDivElement | null; }) => void; /** * Sets the default value of the Calendar. */ defaultValue?: Date | null; /** * An event that is called after the value of the Calendar has changed. */ onChange?: (event: CalendarChangeEvent) => void; /** * Sets the value of the Calendar. */ value?: Date | null; /** * @hidden */ mobileMode?: boolean; /** * @hidden */ unstyled?: DateInputsClassStructure; /** * Enables Web MCP tool registration for this component. * Requires a parent `WebMcpProvider` from `@progress/kendo-react-webmcp`. */ webMcp?: boolean | WebMcpProps; } /** * @hidden */ export interface CalendarState { value: Date | null; activeView: CalendarViewEnum; focusedDate: Date; } /** * Represent the `ref` of the Calendar component. */ export interface CalendarHandle { /** * Returns the HTML element of the Calendar component. */ element: HTMLDivElement | null; /** * Returns the `value` of the Calendar component. */ value: Date | null; /** * Returns the props of the Calendar component. */ readonly props: CalendarProps; /** * @hidden * Focuses the Calendar component. */ focus(): void; } /** * @hidden * The default props of the Calendar component. */ export declare const calendarDefaultProps: { disabled: boolean; min: Date; max: Date; weekDaysFormat: "short"; navigation: boolean; defaultActiveView: ActiveView; defaultValue: Date | null; topView: ActiveView; bottomView: ActiveView; showOtherMonthDays: boolean; }; /** * Represents the PropsContext of the `Calendar` component. * Used for global configuration of all `Calendar` 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 CalendarPropsContext: React.Context<(p: CalendarProps) => CalendarProps>; /** * @hidden * @deprecated Use CalendarHandle directly. */ export declare const CalendarWithoutContext: React.ForwardRefExoticComponent & React.RefAttributes>; /** * Represents the KendoReact Calendar Component. * * Accepts properties of type [CalendarProps](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/calendarprops). * Obtaining the `ref` returns an object of type [CalendarHandle](https://www.telerik.com/kendo-react-ui/components/dateinputs/api/calendarhandle). */ export declare const Calendar: React.ForwardRefExoticComponent & React.RefAttributes>; /** @deprecated Use CalendarHandle directly. */ export type Calendar = CalendarHandle;