@progress/kendo-angular-dateinputs 19.0.0-develop.3 → 19.0.0-develop.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/codemods/template-transformer/index.js +94 -0
  2. package/codemods/utils.js +553 -0
  3. package/codemods/v19/datepicker-subtitle.js +50 -0
  4. package/codemods/v19/datepicker-title.js +50 -0
  5. package/codemods/v19/daterange-popup-subtitle.js +50 -0
  6. package/codemods/v19/daterange-popup-title.js +50 -0
  7. package/codemods/v19/datetimepicker-subtitle.js +50 -0
  8. package/codemods/v19/datetimepicker-title.js +50 -0
  9. package/codemods/v19/timepicker-subtitle.js +50 -0
  10. package/codemods/v19/timepicker-title.js +50 -0
  11. package/dateinput/dateinput.component.d.ts +2 -0
  12. package/datepicker/datepicker.component.d.ts +8 -8
  13. package/datepicker/localization/messages.d.ts +5 -1
  14. package/daterange/date-range-popup.component.d.ts +12 -12
  15. package/daterange/localization/messages.d.ts +5 -1
  16. package/datetimepicker/datetimepicker.component.d.ts +12 -13
  17. package/datetimepicker/localization/messages.d.ts +5 -1
  18. package/esm2022/dateinput/dateinput.component.mjs +5 -2
  19. package/esm2022/datepicker/datepicker.component.mjs +46 -49
  20. package/esm2022/datepicker/localization/messages.mjs +7 -1
  21. package/esm2022/daterange/date-range-input.mjs +3 -2
  22. package/esm2022/daterange/date-range-popup.component.mjs +59 -59
  23. package/esm2022/daterange/date-range.component.mjs +1 -1
  24. package/esm2022/daterange/localization/messages.mjs +7 -1
  25. package/esm2022/datetimepicker/datetimepicker.component.mjs +86 -97
  26. package/esm2022/datetimepicker/localization/messages.mjs +7 -1
  27. package/esm2022/package-metadata.mjs +2 -2
  28. package/esm2022/timepicker/localization/messages.mjs +7 -1
  29. package/esm2022/timepicker/timepicker.component.mjs +43 -47
  30. package/fesm2022/progress-kendo-angular-dateinputs.mjs +267 -258
  31. package/package.json +61 -11
  32. package/timepicker/localization/messages.d.ts +5 -1
  33. package/timepicker/timepicker.component.d.ts +9 -8
@@ -8,7 +8,7 @@ import { Day } from '@progress/kendo-date-math';
8
8
  import { PopupService } from '@progress/kendo-angular-popup';
9
9
  import { IntlService } from '@progress/kendo-angular-intl';
10
10
  import { MultiTabStop } from '@progress/kendo-angular-common';
11
- import { AdaptiveService } from '@progress/kendo-angular-utils';
11
+ import { AdaptiveSize, AdaptiveService } from '@progress/kendo-angular-utils';
12
12
  import { LocalizationService } from '@progress/kendo-angular-l10n';
13
13
  import { PickerService } from '../common/picker.service';
14
14
  import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
@@ -155,14 +155,12 @@ export declare class DateTimePickerComponent extends MultiTabStop implements OnI
155
155
  * Sets the title of the input element of the DateTimePicker and the title text rendered
156
156
  * in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
157
157
  */
158
- title: string;
158
+ adaptiveTitle: string;
159
159
  /**
160
160
  * Sets the subtitle text rendered in the header of the popup(action sheet).
161
161
  * Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
162
162
  */
163
- set subtitle(subtitle: string);
164
- get subtitle(): string;
165
- private _subtitle;
163
+ adaptiveSubtitle: string;
166
164
  /**
167
165
  * Sets or gets the `disabled` property of the DateTimePicker and determines whether the component is active
168
166
  * ([see example]({% slug disabled_datetimepicker %})).
@@ -467,6 +465,10 @@ export declare class DateTimePickerComponent extends MultiTabStop implements OnI
467
465
  * @hidden
468
466
  */
469
467
  checkIcon: SVGIcon;
468
+ /**
469
+ * @hidden
470
+ */
471
+ windowSize: AdaptiveSize;
470
472
  /**
471
473
  * @hidden
472
474
  */
@@ -557,7 +559,6 @@ export declare class DateTimePickerComponent extends MultiTabStop implements OnI
557
559
  private _size;
558
560
  private _rounded;
559
561
  private _fillMode;
560
- private windowSize;
561
562
  constructor(popupService: PopupService, intl: IntlService, cdr: ChangeDetectorRef, pickerService: PickerService, ngZone: NgZone, wrapper: ElementRef<HTMLElement>, localization: LocalizationService, disabledDatesService: DisabledDatesService, renderer: Renderer2, injector: Injector, adaptiveService: AdaptiveService);
562
563
  ngOnInit(): void;
563
564
  ngAfterViewInit(): void;
@@ -674,19 +675,17 @@ export declare class DateTimePickerComponent extends MultiTabStop implements OnI
674
675
  * @hidden
675
676
  */
676
677
  handleActionSheetCollapse(): void;
677
- /**
678
- * @hidden
679
- */
680
- popupButtonsClasses(type?: string): any;
681
678
  /**
682
679
  * @hidden
683
680
  *
684
681
  * Prevents the diversion of the focus from the currently active element in the component.
685
682
  */
686
683
  preventMouseDown(event: MouseEvent): void;
684
+ /**
685
+ * @hidden
686
+ */
687
+ toggleActionSheet(show: boolean): void;
687
688
  private _togglePopup;
688
- private toggleActionSheet;
689
- private updateActionSheetAdaptiveAppearance;
690
689
  /**
691
690
  * Changes the tab and the calendar or clock icon to the designated default.
692
691
  */
@@ -739,5 +738,5 @@ export declare class DateTimePickerComponent extends MultiTabStop implements OnI
739
738
  private handleDateCompletenessChange;
740
739
  private setComponentClasses;
741
740
  static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerComponent, never>;
742
- static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent, "kendo-datetimepicker", ["kendo-datetimepicker"], { "focusableId": { "alias": "focusableId"; "required": false; }; "weekDaysFormat": { "alias": "weekDaysFormat"; "required": false; }; "showOtherMonthDays": { "alias": "showOtherMonthDays"; "required": false; }; "value": { "alias": "value"; "required": false; }; "format": { "alias": "format"; "required": false; }; "twoDigitYearMax": { "alias": "twoDigitYearMax"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "readOnlyInput": { "alias": "readOnlyInput"; "required": false; }; "cancelButton": { "alias": "cancelButton"; "required": false; }; "formatPlaceholder": { "alias": "formatPlaceholder"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "steps": { "alias": "steps"; "required": false; }; "focusedDate": { "alias": "focusedDate"; "required": false; }; "calendarType": { "alias": "calendarType"; "required": false; }; "animateCalendarNavigation": { "alias": "animateCalendarNavigation"; "required": false; }; "weekNumber": { "alias": "weekNumber"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "rangeValidation": { "alias": "rangeValidation"; "required": false; }; "disabledDatesValidation": { "alias": "disabledDatesValidation"; "required": false; }; "incompleteDateValidation": { "alias": "incompleteDateValidation"; "required": false; }; "autoCorrectParts": { "alias": "autoCorrectParts"; "required": false; }; "autoSwitchParts": { "alias": "autoSwitchParts"; "required": false; }; "autoSwitchKeys": { "alias": "autoSwitchKeys"; "required": false; }; "enableMouseWheel": { "alias": "enableMouseWheel"; "required": false; }; "allowCaretMode": { "alias": "allowCaretMode"; "required": false; }; "clearButton": { "alias": "clearButton"; "required": false; }; "autoFill": { "alias": "autoFill"; "required": false; }; "adaptiveMode": { "alias": "adaptiveMode"; "required": false; }; "inputAttributes": { "alias": "inputAttributes"; "required": false; }; "defaultTab": { "alias": "defaultTab"; "required": false; }; "size": { "alias": "size"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "fillMode": { "alias": "fillMode"; "required": false; }; "headerTemplateRef": { "alias": "headerTemplate"; "required": false; }; "footerTemplateRef": { "alias": "footerTemplate"; "required": false; }; "footer": { "alias": "footer"; "required": false; }; }, { "valueChange": "valueChange"; "open": "open"; "close": "close"; "onFocus": "focus"; "onBlur": "blur"; "escape": "escape"; }, ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate"], never, true, never>;
741
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent, "kendo-datetimepicker", ["kendo-datetimepicker"], { "focusableId": { "alias": "focusableId"; "required": false; }; "weekDaysFormat": { "alias": "weekDaysFormat"; "required": false; }; "showOtherMonthDays": { "alias": "showOtherMonthDays"; "required": false; }; "value": { "alias": "value"; "required": false; }; "format": { "alias": "format"; "required": false; }; "twoDigitYearMax": { "alias": "twoDigitYearMax"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; "adaptiveTitle": { "alias": "adaptiveTitle"; "required": false; }; "adaptiveSubtitle": { "alias": "adaptiveSubtitle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "readOnlyInput": { "alias": "readOnlyInput"; "required": false; }; "cancelButton": { "alias": "cancelButton"; "required": false; }; "formatPlaceholder": { "alias": "formatPlaceholder"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "steps": { "alias": "steps"; "required": false; }; "focusedDate": { "alias": "focusedDate"; "required": false; }; "calendarType": { "alias": "calendarType"; "required": false; }; "animateCalendarNavigation": { "alias": "animateCalendarNavigation"; "required": false; }; "weekNumber": { "alias": "weekNumber"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "rangeValidation": { "alias": "rangeValidation"; "required": false; }; "disabledDatesValidation": { "alias": "disabledDatesValidation"; "required": false; }; "incompleteDateValidation": { "alias": "incompleteDateValidation"; "required": false; }; "autoCorrectParts": { "alias": "autoCorrectParts"; "required": false; }; "autoSwitchParts": { "alias": "autoSwitchParts"; "required": false; }; "autoSwitchKeys": { "alias": "autoSwitchKeys"; "required": false; }; "enableMouseWheel": { "alias": "enableMouseWheel"; "required": false; }; "allowCaretMode": { "alias": "allowCaretMode"; "required": false; }; "clearButton": { "alias": "clearButton"; "required": false; }; "autoFill": { "alias": "autoFill"; "required": false; }; "adaptiveMode": { "alias": "adaptiveMode"; "required": false; }; "inputAttributes": { "alias": "inputAttributes"; "required": false; }; "defaultTab": { "alias": "defaultTab"; "required": false; }; "size": { "alias": "size"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "fillMode": { "alias": "fillMode"; "required": false; }; "headerTemplateRef": { "alias": "headerTemplate"; "required": false; }; "footerTemplateRef": { "alias": "footerTemplate"; "required": false; }; "footer": { "alias": "footer"; "required": false; }; }, { "valueChange": "valueChange"; "open": "open"; "close": "close"; "onFocus": "focus"; "onBlur": "blur"; "escape": "escape"; }, ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate"], never, true, never>;
743
742
  }
@@ -92,6 +92,10 @@ export declare class DateTimePickerMessages extends ComponentMessages {
92
92
  * The title of the **Clear** button of the DateTimePicker.
93
93
  */
94
94
  clearTitle: string;
95
+ /**
96
+ * The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode.
97
+ */
98
+ adaptiveCloseButtonTitle: string;
95
99
  static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerMessages, never>;
96
- static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimePickerMessages, "kendo-datetimepicker-messages-base", never, { "toggle": { "alias": "toggle"; "required": false; }; "dateTab": { "alias": "dateTab"; "required": false; }; "dateTabLabel": { "alias": "dateTabLabel"; "required": false; }; "timeTab": { "alias": "timeTab"; "required": false; }; "timeTabLabel": { "alias": "timeTabLabel"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "acceptLabel": { "alias": "acceptLabel"; "required": false; }; "cancel": { "alias": "cancel"; "required": false; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; }; "today": { "alias": "today"; "required": false; }; "now": { "alias": "now"; "required": false; }; "nowLabel": { "alias": "nowLabel"; "required": false; }; "prevButtonTitle": { "alias": "prevButtonTitle"; "required": false; }; "nextButtonTitle": { "alias": "nextButtonTitle"; "required": false; }; "parentViewButtonTitle": { "alias": "parentViewButtonTitle"; "required": false; }; "hour": { "alias": "hour"; "required": false; }; "minute": { "alias": "minute"; "required": false; }; "second": { "alias": "second"; "required": false; }; "millisecond": { "alias": "millisecond"; "required": false; }; "dayperiod": { "alias": "dayperiod"; "required": false; }; "clearTitle": { "alias": "clearTitle"; "required": false; }; }, {}, never, never, false, never>;
100
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateTimePickerMessages, "kendo-datetimepicker-messages-base", never, { "toggle": { "alias": "toggle"; "required": false; }; "dateTab": { "alias": "dateTab"; "required": false; }; "dateTabLabel": { "alias": "dateTabLabel"; "required": false; }; "timeTab": { "alias": "timeTab"; "required": false; }; "timeTabLabel": { "alias": "timeTabLabel"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "acceptLabel": { "alias": "acceptLabel"; "required": false; }; "cancel": { "alias": "cancel"; "required": false; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; }; "today": { "alias": "today"; "required": false; }; "now": { "alias": "now"; "required": false; }; "nowLabel": { "alias": "nowLabel"; "required": false; }; "prevButtonTitle": { "alias": "prevButtonTitle"; "required": false; }; "nextButtonTitle": { "alias": "nextButtonTitle"; "required": false; }; "parentViewButtonTitle": { "alias": "parentViewButtonTitle"; "required": false; }; "hour": { "alias": "hour"; "required": false; }; "minute": { "alias": "minute"; "required": false; }; "second": { "alias": "second"; "required": false; }; "millisecond": { "alias": "millisecond"; "required": false; }; "dayperiod": { "alias": "dayperiod"; "required": false; }; "clearTitle": { "alias": "clearTitle"; "required": false; }; "adaptiveCloseButtonTitle": { "alias": "adaptiveCloseButtonTitle"; "required": false; }; }, {}, never, never, false, never>;
97
101
  }
@@ -24,6 +24,7 @@ import { DateInput } from '@progress/kendo-dateinputs-common';
24
24
  import { IconWrapperComponent } from '@progress/kendo-angular-icons';
25
25
  import { NgIf } from '@angular/common';
26
26
  import { DateInputLocalizedMessagesDirective } from './localization/dateinput-localized-messages.directive';
27
+ import { MAX_DATE, MIN_DATE } from '../defaults';
27
28
  import * as i0 from "@angular/core";
28
29
  import * as i1 from "@progress/kendo-angular-intl";
29
30
  import * as i2 from "@progress/kendo-angular-l10n";
@@ -271,13 +272,15 @@ export class DateInputComponent {
271
272
  /**
272
273
  * Specifies the biggest date that is valid
273
274
  * ([see example]({% slug dateranges_dateinput %})).
275
+ * By default, the `max` value is `2099-12-31`.
274
276
  */
275
- max;
277
+ max = cloneDate(MAX_DATE);
276
278
  /**
277
279
  * Specifies the smallest date that is valid
278
280
  * ([see example]({% slug dateranges_dateinput %})).
281
+ * By default, the `min` value is `1900-1-1`.
279
282
  */
280
- min;
283
+ min = cloneDate(MIN_DATE);
281
284
  /**
282
285
  * Determines whether the built-in min or max validators are to be enforced when a form is being validated.
283
286
  *
@@ -7,7 +7,7 @@ import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
7
7
  import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
8
8
  import { PopupService } from '@progress/kendo-angular-popup';
9
9
  import { cloneDate } from '@progress/kendo-date-math';
10
- import { hasObservers, isControlRequired, isDocumentAvailable, KendoInput, Keys, MultiTabStop, ResizeSensorComponent, EventsOutsideAngularDirective } from '@progress/kendo-angular-common';
10
+ import { hasObservers, isControlRequired, KendoInput, Keys, MultiTabStop, ResizeSensorComponent, EventsOutsideAngularDirective } from '@progress/kendo-angular-common';
11
11
  import { validatePackage } from '@progress/kendo-licensing';
12
12
  import { packageMetadata } from '../package-metadata';
13
13
  import { MIN_DATE, MAX_DATE } from '../defaults';
@@ -466,18 +466,12 @@ export class DatePickerComponent extends MultiTabStop {
466
466
  * Sets the title of the input element of the DatePicker and the title text rendered
467
467
  * in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
468
468
  */
469
- title = "";
469
+ adaptiveTitle = "";
470
470
  /**
471
471
  * Sets the subtitle text rendered in the header of the popup(action sheet).
472
472
  * Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
473
473
  */
474
- set subtitle(subtitle) {
475
- this._subtitle = subtitle;
476
- }
477
- get subtitle() {
478
- return this._subtitle || this.placeholder;
479
- }
480
- _subtitle;
474
+ adaptiveSubtitle = "";
481
475
  /**
482
476
  * Determines whether the built-in min or max validators are enforced when validating a form.
483
477
  *
@@ -661,6 +655,10 @@ export class DatePickerComponent extends MultiTabStop {
661
655
  * @hidden
662
656
  */
663
657
  checkIcon = checkIcon;
658
+ /**
659
+ * @hidden
660
+ */
661
+ windowSize;
664
662
  /**
665
663
  * @hidden
666
664
  */
@@ -690,7 +688,6 @@ export class DatePickerComponent extends MultiTabStop {
690
688
  _size = DEFAULT_SIZE;
691
689
  _rounded = DEFAULT_ROUNDED;
692
690
  _fillMode = DEFAULT_FILL_MODE;
693
- windowSize;
694
691
  constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, disabledDatesService, adaptiveService) {
695
692
  super();
696
693
  this.zone = zone;
@@ -737,11 +734,6 @@ export class DatePickerComponent extends MultiTabStop {
737
734
  ngAfterViewInit() {
738
735
  this.setComponentClasses();
739
736
  this.windowSize = this.adaptiveService.size;
740
- if (this.actionSheet && isDocumentAvailable()) {
741
- // The following syntax is used as it does not violate CSP compliance
742
- this.actionSheet.element.nativeElement.style.setProperty('--kendo-actionsheet-height', '60vh');
743
- this.actionSheet.element.nativeElement.style.setProperty('--kendo-actionsheet-max-height', 'none');
744
- }
745
737
  }
746
738
  /**
747
739
  * @hidden
@@ -1073,7 +1065,6 @@ export class DatePickerComponent extends MultiTabStop {
1073
1065
  }
1074
1066
  if (show && !this.isOpen) {
1075
1067
  this.actionSheet.toggle();
1076
- this.updateActionSheetAdaptiveAppearance();
1077
1068
  this.setAriaActiveDescendant();
1078
1069
  this.actionSheet.element.nativeElement.setAttribute('id', this.popupUID);
1079
1070
  this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
@@ -1084,29 +1075,11 @@ export class DatePickerComponent extends MultiTabStop {
1084
1075
  if (this.dateInput) {
1085
1076
  this.renderer.removeAttribute(this.dateInput.inputElement, attributeNames.ariaActiveDescendant);
1086
1077
  this.renderer.removeAttribute(this.dateInput.inputElement, attributeNames.ariaControls);
1078
+ this.dateInput.focus();
1087
1079
  }
1088
1080
  }
1089
1081
  this._show = show;
1090
1082
  }
1091
- updateActionSheetAdaptiveAppearance() {
1092
- let element;
1093
- let animationContainer;
1094
- if (this.actionSheet) {
1095
- element = this.actionSheet['element'].nativeElement.querySelector('.k-actionsheet');
1096
- animationContainer = this.actionSheet['element'].nativeElement.querySelector('.k-child-animation-container');
1097
- if (this.windowSize === 'medium') {
1098
- this.renderer.removeClass(element, 'k-actionsheet-fullscreen');
1099
- this.renderer.removeStyle(animationContainer, 'height');
1100
- }
1101
- else if (this.windowSize === 'small') {
1102
- this.renderer.addClass(element, 'k-actionsheet-fullscreen');
1103
- this.renderer.setStyle(animationContainer, 'height', '100%');
1104
- }
1105
- this.renderer.addClass(element, 'k-adaptive-actionsheet');
1106
- this.renderer.addClass(element, 'k-actionsheet-bottom');
1107
- this.renderer.setStyle(animationContainer, 'bottom', '0px');
1108
- }
1109
- }
1110
1083
  setAriaActiveDescendant() {
1111
1084
  const focusedCellChangeEvent = this.calendar.type === 'infinite' ?
1112
1085
  this.calendar.monthView.focusedCellChange :
@@ -1228,7 +1201,7 @@ export class DatePickerComponent extends MultiTabStop {
1228
1201
  }
1229
1202
  }
1230
1203
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.PopupService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i3.PickerService }, { token: i4.DisabledDatesService }, { token: i5.AdaptiveService }], target: i0.ɵɵFactoryTarget.Component });
1231
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DatePickerComponent, isStandalone: true, selector: "kendo-datepicker", inputs: { focusableId: "focusableId", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], clearButton: "clearButton", inputAttributes: "inputAttributes", monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], headerTemplateRef: ["headerTemplate", "headerTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], footer: "footer", navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"], weekDaysFormat: "weekDaysFormat", showOtherMonthDays: "showOtherMonthDays", activeView: "activeView", bottomView: "bottomView", topView: "topView", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", popupSettings: "popupSettings", navigation: "navigation", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", autoCorrectParts: "autoCorrectParts", autoSwitchParts: "autoSwitchParts", autoSwitchKeys: "autoSwitchKeys", enableMouseWheel: "enableMouseWheel", allowCaretMode: "allowCaretMode", autoFill: "autoFill", focusedDate: "focusedDate", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", title: "title", subtitle: "subtitle", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", weekNumber: "weekNumber", size: "size", rounded: "rounded", fillMode: "fillMode", adaptiveMode: "adaptiveMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close", escape: "escape" }, host: { properties: { "class.k-readonly": "this.readonly", "class.k-datepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
1204
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DatePickerComponent, isStandalone: true, selector: "kendo-datepicker", inputs: { focusableId: "focusableId", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], clearButton: "clearButton", inputAttributes: "inputAttributes", monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], headerTemplateRef: ["headerTemplate", "headerTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], footer: "footer", navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"], weekDaysFormat: "weekDaysFormat", showOtherMonthDays: "showOtherMonthDays", activeView: "activeView", bottomView: "bottomView", topView: "topView", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", popupSettings: "popupSettings", navigation: "navigation", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", autoCorrectParts: "autoCorrectParts", autoSwitchParts: "autoSwitchParts", autoSwitchKeys: "autoSwitchKeys", enableMouseWheel: "enableMouseWheel", allowCaretMode: "allowCaretMode", autoFill: "autoFill", focusedDate: "focusedDate", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", adaptiveTitle: "adaptiveTitle", adaptiveSubtitle: "adaptiveSubtitle", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", weekNumber: "weekNumber", size: "size", rounded: "rounded", fillMode: "fillMode", adaptiveMode: "adaptiveMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close", escape: "escape" }, host: { properties: { "class.k-readonly": "this.readonly", "class.k-datepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
1232
1205
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true },
1233
1206
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => DatePickerComponent), multi: true },
1234
1207
  { provide: KendoInput, useExisting: forwardRef(() => DatePickerComponent) },
@@ -1259,6 +1232,9 @@ export class DatePickerComponent extends MultiTabStop {
1259
1232
 
1260
1233
  i18n-clearTitle="kendo.datepicker.clearTitle|The title of the clear button"
1261
1234
  clearTitle="clear"
1235
+
1236
+ i18n-adaptiveCloseButtonTitle="kendo.datepicker.adaptiveCloseButtonTitle|The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
1237
+ adaptiveCloseButtonTitle="Close"
1262
1238
  >
1263
1239
  </ng-container>
1264
1240
  <kendo-dateinput
@@ -1273,7 +1249,7 @@ export class DatePickerComponent extends MultiTabStop {
1273
1249
  [ariaReadOnly]="readonly"
1274
1250
  [tabindex]="tabindex"
1275
1251
  [isRequired]="isControlRequired"
1276
- [title]="title"
1252
+ [title]="adaptiveTitle"
1277
1253
  [focusableId]="focusableId"
1278
1254
  [format]="format"
1279
1255
  [twoDigitYearMax]="twoDigitYearMax"
@@ -1339,26 +1315,35 @@ export class DatePickerComponent extends MultiTabStop {
1339
1315
  [scope]="this"
1340
1316
  (collapse)="handleActionSheetCollapse()"
1341
1317
  [titleId]="calendar?.headerId"
1318
+ [cssClass]="{
1319
+ 'k-adaptive-actionsheet': true,
1320
+ 'k-actionsheet-fullscreen': windowSize === 'small',
1321
+ 'k-actionsheet-bottom': windowSize === 'medium'
1322
+ }"
1323
+ [cssStyle]="{
1324
+ height: windowSize === 'small' ? '100vh' : '60vh'
1325
+ }"
1342
1326
  >
1343
1327
  <ng-template kendoActionSheetTemplate>
1344
1328
  <div class="k-actionsheet-titlebar">
1345
1329
  <div class="k-actionsheet-titlebar-group">
1346
1330
  <div class="k-actionsheet-title">
1347
- <div *ngIf="title" class="k-text-center">{{ title }}</div>
1348
- <div *ngIf="subtitle" class="k-actionsheet-subtitle k-text-center">{{ subtitle }}</div>
1331
+ <div class="k-text-center" *ngIf="adaptiveTitle">{{ adaptiveTitle }}</div>
1332
+ <div class="k-actionsheet-subtitle k-text-center" *ngIf="adaptiveSubtitle">{{ adaptiveSubtitle }}</div>
1349
1333
  </div>
1350
1334
  <div class="k-actionsheet-actions">
1351
1335
  <button
1352
1336
  kendoButton
1353
1337
  type="button"
1354
1338
  icon="check"
1355
- [attr.title]="localization.get('clearTitle')"
1339
+ themeColor="primary"
1340
+ [attr.title]="localization.get('adaptiveCloseButtonTitle')"
1356
1341
  [svgIcon]="checkIcon"
1357
1342
  fillMode="flat"
1358
1343
  [tabIndex]="-1"
1359
1344
  aria-hidden="true"
1360
1345
  size="large"
1361
- themeColor="primary"
1346
+ innerCssClass="k-button-icon"
1362
1347
  (click)="show = false">
1363
1348
  </button>
1364
1349
  </div>
@@ -1414,7 +1399,7 @@ export class DatePickerComponent extends MultiTabStop {
1414
1399
  </kendo-calendar-messages>
1415
1400
  </kendo-calendar>
1416
1401
  </ng-template>
1417
- `, isInline: true, dependencies: [{ kind: "directive", type: DatePickerLocalizedMessagesDirective, selector: "[kendoDatePickerLocalizedMessages]" }, { kind: "component", type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "clearButton", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "isRequired", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { kind: "component", type: DateInputCustomMessagesComponent, selector: "kendo-dateinput-messages" }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["actions", "actionsLayout", "overlayClickClose", "title", "subtitle", "items", "cssClass", "cssStyle", "animation", "expanded", "titleId"], outputs: ["expandedChange", "action", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "directive", type: ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: CalendarComponent, selector: "kendo-calendar", inputs: ["showOtherMonthDays", "id", "focusedDate", "min", "max", "rangeValidation", "weekDaysFormat", "footer", "selection", "allowReverse", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "navigationItemTemplate", "size", "activeRangeEnd"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { kind: "component", type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1402
+ `, isInline: true, dependencies: [{ kind: "directive", type: DatePickerLocalizedMessagesDirective, selector: "[kendoDatePickerLocalizedMessages]" }, { kind: "component", type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "clearButton", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "isRequired", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { kind: "component", type: DateInputCustomMessagesComponent, selector: "kendo-dateinput-messages" }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["actions", "actionsLayout", "overlayClickClose", "title", "subtitle", "items", "cssClass", "cssStyle", "animation", "expanded", "titleId", "initialFocus"], outputs: ["expandedChange", "action", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "directive", type: ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: CalendarComponent, selector: "kendo-calendar", inputs: ["showOtherMonthDays", "id", "focusedDate", "min", "max", "rangeValidation", "weekDaysFormat", "footer", "selection", "allowReverse", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "navigationItemTemplate", "size", "activeRangeEnd"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { kind: "component", type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1418
1403
  }
1419
1404
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerComponent, decorators: [{
1420
1405
  type: Component,
@@ -1454,6 +1439,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1454
1439
 
1455
1440
  i18n-clearTitle="kendo.datepicker.clearTitle|The title of the clear button"
1456
1441
  clearTitle="clear"
1442
+
1443
+ i18n-adaptiveCloseButtonTitle="kendo.datepicker.adaptiveCloseButtonTitle|The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
1444
+ adaptiveCloseButtonTitle="Close"
1457
1445
  >
1458
1446
  </ng-container>
1459
1447
  <kendo-dateinput
@@ -1468,7 +1456,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1468
1456
  [ariaReadOnly]="readonly"
1469
1457
  [tabindex]="tabindex"
1470
1458
  [isRequired]="isControlRequired"
1471
- [title]="title"
1459
+ [title]="adaptiveTitle"
1472
1460
  [focusableId]="focusableId"
1473
1461
  [format]="format"
1474
1462
  [twoDigitYearMax]="twoDigitYearMax"
@@ -1534,26 +1522,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1534
1522
  [scope]="this"
1535
1523
  (collapse)="handleActionSheetCollapse()"
1536
1524
  [titleId]="calendar?.headerId"
1525
+ [cssClass]="{
1526
+ 'k-adaptive-actionsheet': true,
1527
+ 'k-actionsheet-fullscreen': windowSize === 'small',
1528
+ 'k-actionsheet-bottom': windowSize === 'medium'
1529
+ }"
1530
+ [cssStyle]="{
1531
+ height: windowSize === 'small' ? '100vh' : '60vh'
1532
+ }"
1537
1533
  >
1538
1534
  <ng-template kendoActionSheetTemplate>
1539
1535
  <div class="k-actionsheet-titlebar">
1540
1536
  <div class="k-actionsheet-titlebar-group">
1541
1537
  <div class="k-actionsheet-title">
1542
- <div *ngIf="title" class="k-text-center">{{ title }}</div>
1543
- <div *ngIf="subtitle" class="k-actionsheet-subtitle k-text-center">{{ subtitle }}</div>
1538
+ <div class="k-text-center" *ngIf="adaptiveTitle">{{ adaptiveTitle }}</div>
1539
+ <div class="k-actionsheet-subtitle k-text-center" *ngIf="adaptiveSubtitle">{{ adaptiveSubtitle }}</div>
1544
1540
  </div>
1545
1541
  <div class="k-actionsheet-actions">
1546
1542
  <button
1547
1543
  kendoButton
1548
1544
  type="button"
1549
1545
  icon="check"
1550
- [attr.title]="localization.get('clearTitle')"
1546
+ themeColor="primary"
1547
+ [attr.title]="localization.get('adaptiveCloseButtonTitle')"
1551
1548
  [svgIcon]="checkIcon"
1552
1549
  fillMode="flat"
1553
1550
  [tabIndex]="-1"
1554
1551
  aria-hidden="true"
1555
1552
  size="large"
1556
- themeColor="primary"
1553
+ innerCssClass="k-button-icon"
1557
1554
  (click)="show = false">
1558
1555
  </button>
1559
1556
  </div>
@@ -1756,9 +1753,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1756
1753
  type: Input
1757
1754
  }], disabledDates: [{
1758
1755
  type: Input
1759
- }], title: [{
1756
+ }], adaptiveTitle: [{
1760
1757
  type: Input
1761
- }], subtitle: [{
1758
+ }], adaptiveSubtitle: [{
1762
1759
  type: Input
1763
1760
  }], rangeValidation: [{
1764
1761
  type: Input
@@ -33,8 +33,12 @@ export class DatePickerMessages extends ComponentMessages {
33
33
  * The title of the **Clear** button of the DatePicker.
34
34
  */
35
35
  clearTitle;
36
+ /**
37
+ * The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode.
38
+ */
39
+ adaptiveCloseButtonTitle;
36
40
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
37
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DatePickerMessages, selector: "kendo-datepicker-messages-base", inputs: { today: "today", toggle: "toggle", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle", parentViewButtonTitle: "parentViewButtonTitle", clearTitle: "clearTitle" }, usesInheritance: true, ngImport: i0 });
41
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DatePickerMessages, selector: "kendo-datepicker-messages-base", inputs: { today: "today", toggle: "toggle", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle", parentViewButtonTitle: "parentViewButtonTitle", clearTitle: "clearTitle", adaptiveCloseButtonTitle: "adaptiveCloseButtonTitle" }, usesInheritance: true, ngImport: i0 });
38
42
  }
39
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerMessages, decorators: [{
40
44
  type: Directive,
@@ -54,4 +58,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
54
58
  type: Input
55
59
  }], clearTitle: [{
56
60
  type: Input
61
+ }], adaptiveCloseButtonTitle: [{
62
+ type: Input
57
63
  }] } });
@@ -76,8 +76,9 @@ export class DateRangeInput {
76
76
  [
77
77
  popup.cancel.subscribe(() => this.isActiveEnd && this.input.focus()),
78
78
  popup.onFocus.subscribe(() => this.toggleActiveClass(this.isActiveEnd)),
79
- popup.onBlur.subscribe(() => this.deactivate())
80
- ].map(s => this.popupSubscriptions.add(s));
79
+ popup.onBlur.subscribe(() => this.deactivate()),
80
+ popup.close?.subscribe(() => this.isActiveEnd && this.input.focus())
81
+ ].forEach(s => this.popupSubscriptions.add(s));
81
82
  }
82
83
  unsubscribePopup() {
83
84
  this.popupSubscriptions.unsubscribe();