@progress/kendo-angular-dateinputs
Version:
Kendo UI for Angular Date Inputs Package - Everything you need to add date selection functionality to apps (DatePicker, TimePicker, DateInput, DateRangePicker, DateTimePicker, Calendar, and MultiViewCalendar).
39 lines (38 loc) • 1.78 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { SelectionRangeEnd } from "./selection-range-end.type";
import { SelectionRange } from "./selection-range.interface";
/**
* Defines the Calendar selection mode behavior.
*
* The available values are:
* - `single` (default) - Allows selection of a single date
* - `multiple` - Allows selection of multiple individual dates
* - `range` - Allows selection of a date range with start and end dates
*
* @example
* ```typescript
* const selectionMode: CalendarSelection = 'range';
* ```
*/
export type CalendarSelection = 'single' | 'multiple' | 'range';
/**
* Handles range selection logic for Calendar components.
*
* This function manages the selection state when the Calendar is in range selection mode,
* determining which end of the range is active and updating the selection range accordingly.
*
* @param date - The date being selected
* @param selectionRange - The current selection range object
* @param activeRangeEnd - Which end of the range is currently active ('start' or 'end')
* @param allowReverse - Whether to allow reverse selection (end date before start date)
* @returns An object containing the updated activeRangeEnd and selectionRange
*
* @hidden
*/
export declare function handleRangeSelection(date: Date, selectionRange: SelectionRange, activeRangeEnd: SelectionRangeEnd, allowReverse?: boolean): {
activeRangeEnd: SelectionRangeEnd;
selectionRange: SelectionRange;
};