UNPKG

@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).

89 lines (88 loc) 4.66 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core'; import { DateRangeService } from './date-range.service'; import { MultiViewCalendarComponent } from '../calendar/multiview-calendar.component'; import { SelectionRange } from '../calendar/models/selection-range.interface'; import { SelectionRangeEnd } from '../calendar/models/selection-range-end.type'; import { AutoCorrectOn } from './auto-correct-on.type'; import * as i0 from "@angular/core"; /** * A directive which manages the MultiViewCalendar range selection. * This directive will be `deprecated` in a future version. * We recommend using the MultiViewCalendar [range selection]({% slug selection_multiviewcalendar %}#toc-range-selection). */ export declare class DateRangeSelectionDirective implements OnInit { private calendar; private cdr; private element; private dateRangeService; /** * Specifies the auto-correction behavior. If the start date is greater than the end date, * the directive fixes the date range to a single date either on input change or on blur * ([see example](slug:autocorrect_daterange#toc-calendar-selection-directive)). * * By default, the auto-correction is triggered on change. * To disable this behavior, set the `autoCorrectOn` property to `none`. */ autoCorrectOn: AutoCorrectOn; /** * Gets or sets the selection range of the calendar. When a new range is set, * the connected DateRangeService notifies all related parties. */ get selectionRange(): SelectionRange; set selectionRange(range: SelectionRange); /** * Gets or sets the active end of the selection range. This option determines which range end will be updated on * user interaction. When a new active end is set, the connected DateRangeService notifies all related parties. */ /** * Specifies which end of the selection range will be marked as active. The active end gets modified upon user * interaction. When a new active end is set, the wired DateRangeService notifies all related components. For * example, the start and end DateInput components. * * > If the selection range is undefined, the value is ignored. */ get activeRangeEnd(): SelectionRangeEnd; set activeRangeEnd(activeRange: SelectionRangeEnd); /** * @hidden * When in adaptive mode range should not be set automatically on calendar value change but only on accept */ shouldSetRange: boolean; /** * Fires when the active range end is changed. For more information, refer to * the section on [events](slug:events_multiviewcalendar). */ activeRangeEndChange: EventEmitter<SelectionRangeEnd>; /** * Fires when the selection range is changed. For more information, refer to * the section on [events](slug:events_multiviewcalendar). */ selectionRangeChange: EventEmitter<SelectionRange>; private get calendarRange(); private calendarSubscriptions; private range; constructor(calendar: MultiViewCalendarComponent, cdr: ChangeDetectorRef, element: ElementRef, renderer: Renderer2, dateRangeService: DateRangeService); ngOnInit(): void; ngOnDestroy(): void; /** * @hidden */ handleChange(value: Date): void; setRange(range?: SelectionRange): void; private addSubscriptions; private isEqualCalendarRange; private handleBlur; private handleHover; private hasCompleteRange; private shouldAutoCorrect; private updateFocusedDate; private updateRange; private setSelectionRange; private acceptAndEmit; static ɵfac: i0.ɵɵFactoryDeclaration<DateRangeSelectionDirective, [null, null, null, null, { optional: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<DateRangeSelectionDirective, "[kendoDateRangeSelection]", never, { "autoCorrectOn": { "alias": "autoCorrectOn"; "required": false; }; "selectionRange": { "alias": "selectionRange"; "required": false; }; "activeRangeEnd": { "alias": "activeRangeEnd"; "required": false; }; "shouldSetRange": { "alias": "shouldSetRange"; "required": false; }; }, { "activeRangeEndChange": "activeRangeEndChange"; "selectionRangeChange": "selectionRangeChange"; }, never, never, true, never>; }