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

63 lines (62 loc) 3.04 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ElementRef, Renderer2, NgZone, OnInit, OnDestroy } from '@angular/core'; import { DateInputComponent } from '../dateinput/dateinput.component'; import { AutoCorrectOn } from './auto-correct-on.type'; import { DateRangeInput } from './date-range-input'; import { DateRangeService } from './date-range.service'; import { SelectionRange } from '../calendar/models/selection-range.interface'; import * as i0 from "@angular/core"; /** * Manages the end date selection in a date range. * * You can use the `DateRangeEndInputDirective` only with a DateInput component. * * @example * ```typescript * @Component({ * selector: 'my-app', * template: ` * <kendo-daterange> * <kendo-dateinput kendoDateRangeStartInput [(value)]="startDate"></kendo-dateinput> * <kendo-dateinput kendoDateRangeEndInput [(value)]="endDate"></kendo-dateinput> * </kendo-daterange> * ` * }) * export class AppComponent { * public startDate: Date = new Date(); * public endDate: Date = new Date(); * } * ``` * * @remarks * Applied to: {@link DateInputComponent} */ export declare class DateRangeEndInputDirective extends DateRangeInput implements OnInit, OnDestroy { private rangeService; private dateInput; /** * 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-input-directives)). * * By default, the component does not perform any auto-correction. * */ autoCorrectOn: AutoCorrectOn; /** * Specifies the navigation behavior of the calendar when the active end is changed on input focus. When enabled, * the calendar navigates to the value of the focused input. Otherwise, the calendar displays the last picked date. * * @default false */ navigateCalendarOnFocus: boolean; constructor(rangeService: DateRangeService, dateInput: DateInputComponent, element: ElementRef, renderer: Renderer2, zone: NgZone); ngOnInit(): void; protected ngAfterViewInit(): void; ngOnDestroy(): void; protected getRange(value: Date, correctOn: AutoCorrectOn): SelectionRange; protected updateInputValue(range: SelectionRange): void; static ɵfac: i0.ɵɵFactoryDeclaration<DateRangeEndInputDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<DateRangeEndInputDirective, "[kendoDateRangeEndInput]", never, { "autoCorrectOn": { "alias": "autoCorrectOn"; "required": false; }; "navigateCalendarOnFocus": { "alias": "navigateCalendarOnFocus"; "required": false; }; }, {}, never, never, true, never>; }