@progress/kendo-react-dateinputs
Version:
KendoReact Date Inputs package
104 lines (103 loc) • 3.6 kB
TypeScript
/// <reference types="react" />
import { ActiveView } from './ActiveView';
import { SelectionRangeEnd } from './SelectionRangeEnd';
import { MultiViewCalendarMode } from './MultiViewCalendarMode';
import { CalendarCellProps } from '../components/CalendarCell';
import { CalendarWeekCellProps } from '../components/CalendarWeekCell';
import { CalendarHeaderTitleProps } from '../components/CalendarHeaderTitle';
/**
* @hidden
*/
export interface MultiViewCalendarSettings {
/**
* Specifies which end of the defined selection range will be marked as active.
*
* > If the selection range is undefined, the value is ignored.
*/
activeRangeEnd?: SelectionRangeEnd;
/**
* If set to `true`, the component skips the validation of whether the `from` value is after the `to` value.
*/
allowReverse?: boolean;
/**
* Defines the bottommost view to which the user can navigate.
*/
bottomView?: ActiveView;
/**
* Sets the `className` of the MultiViewCalendar.
*/
className?: string;
/**
* Sets the default active view of the MultiViewCalendar.
* If not set, the MultiViewCalendar displays the month view.
*/
defaultActiveView?: ActiveView;
/**
* Sets the `views` property of the MultiViewCalendar and defines the number of rendered views.
*/
views?: number;
/**
* Determines if the week number column will be displayed.
*/
weekNumber?: boolean;
/**
* Fires each time the MultiViewCalendar is focused.
*/
onFocus?: (event: React.FocusEvent<any>) => void;
/**
* Sets the `tabIndex` property of the MultiViewCalendar.
*/
tabIndex?: number;
/**
* Defines the topmost view to which the user can navigate.
*/
topView?: ActiveView;
/**
* Determines whether the MultiViewCalendar is disabled.
*/
disabled?: boolean;
/**
* Sets the initial focused date of the MultiViewCalendar.
*/
focusedDate?: Date;
/**
* Sets the `id` of the MultiViewCalendar.
*/
id?: string;
/**
* Sets the maximum allowed date of the MultiViewCalendar. Defaults to `2099-12-31`.
*/
max?: Date;
/**
* Sets the minimum allowed date of the MultiViewCalendar. Defaults to `1900-1-1`.
*/
min?: Date;
/**
* Sets the selection mode of the MultiViewCalendar.
*
* The available modes are:
* * (Default) `single`—Renders a single-date selection.
* * `multiple`—Renders a multiple-date selection.
* * `range`—Renders a date-range selection.
*/
mode?: MultiViewCalendarMode;
/**
* Fires each time the MultiViewCalendar is blurred.
*/
onBlur?: (event: React.FocusEvent<any>) => void;
/**
* Enables the customization or the override of the default MultiViewCalendar cell
* ([see example]({% slug custom_rendering_multiviewcalendar %}#toc-cells-inside-the-view)).
*/
cell?: React.ComponentType<CalendarCellProps>;
/**
* Enables the customization or the override of the default week cell in the MultiViewCalendar
* ([see example]({% slug custom_rendering_multiviewcalendar %}#toc-cells-inside-the-week-column)).
*/
weekCell?: React.ComponentType<CalendarWeekCellProps>;
/**
* Enables the customization or the override of the default header title in the MultiViewCalendar
* ([see example]({% slug custom_rendering_multiviewcalendar %}#toc-titles-of-current-views)).
*/
headerTitle?: React.ComponentType<CalendarHeaderTitleProps>;
}