@progress/kendo-angular-dateinputs 5.3.0 → 5.3.1-dev.202112011809

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/dist/cdn/js/kendo-angular-dateinputs.js +2 -2
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/calendar/calendar.component.js +58 -45
  4. package/dist/es/calendar/horizontal-view-list.component.js +1 -1
  5. package/dist/es/calendar/multiview-calendar.component.js +27 -17
  6. package/dist/es/calendar/view-list.component.js +1 -1
  7. package/dist/es/datepicker/datepicker.component.js +5 -3
  8. package/dist/es/package-metadata.js +1 -1
  9. package/dist/es/util.js +15 -0
  10. package/dist/es2015/calendar/calendar.component.d.ts +10 -3
  11. package/dist/es2015/calendar/calendar.component.js +58 -39
  12. package/dist/es2015/calendar/horizontal-view-list.component.js +1 -0
  13. package/dist/es2015/calendar/multiview-calendar.component.d.ts +10 -2
  14. package/dist/es2015/calendar/multiview-calendar.component.js +27 -13
  15. package/dist/es2015/calendar/view-list.component.js +5 -1
  16. package/dist/es2015/dateinput/dateinput.component.d.ts +2 -0
  17. package/dist/es2015/datepicker/datepicker.component.d.ts +2 -0
  18. package/dist/es2015/datepicker/datepicker.component.js +5 -3
  19. package/dist/es2015/index.metadata.json +1 -1
  20. package/dist/es2015/package-metadata.js +1 -1
  21. package/dist/es2015/util.d.ts +7 -0
  22. package/dist/es2015/util.js +15 -0
  23. package/dist/fesm2015/index.js +6989 -6936
  24. package/dist/fesm5/index.js +6405 -6367
  25. package/dist/npm/calendar/calendar.component.js +58 -45
  26. package/dist/npm/calendar/horizontal-view-list.component.js +1 -1
  27. package/dist/npm/calendar/multiview-calendar.component.js +27 -17
  28. package/dist/npm/calendar/view-list.component.js +1 -1
  29. package/dist/npm/datepicker/datepicker.component.js +4 -2
  30. package/dist/npm/package-metadata.js +1 -1
  31. package/dist/npm/util.js +15 -0
  32. package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
  33. package/package.json +1 -1
@@ -11,6 +11,7 @@ import { cloneDate, isEqual } from '@progress/kendo-date-math';
11
11
  import { hasObservers, KendoInput, guid, Keys } from '@progress/kendo-angular-common';
12
12
  import { validatePackage } from '@progress/kendo-licensing';
13
13
  import { packageMetadata } from '../package-metadata';
14
+ import { MultiViewCalendarComponent } from './multiview-calendar.component';
14
15
  import { NavigationComponent } from './navigation.component';
15
16
  import { ViewListComponent } from './view-list.component';
16
17
  import { CalendarDOMService } from './services/dom.service';
@@ -448,15 +449,9 @@ var CalendarComponent = /** @class */ (function () {
448
449
  enumerable: true,
449
450
  configurable: true
450
451
  });
451
- Object.defineProperty(CalendarComponent.prototype, "widgetRole", {
452
- get: function () {
453
- return 'grid';
454
- },
455
- enumerable: true,
456
- configurable: true
457
- });
458
452
  Object.defineProperty(CalendarComponent.prototype, "calendarTabIndex", {
459
453
  get: function () {
454
+ // in Classic mode, the inner MultiViewCalendar is the focusable element
460
455
  return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
461
456
  },
462
457
  enumerable: true,
@@ -464,7 +459,8 @@ var CalendarComponent = /** @class */ (function () {
464
459
  });
465
460
  Object.defineProperty(CalendarComponent.prototype, "ariaDisabled", {
466
461
  get: function () {
467
- return this.disabled;
462
+ // in Classic mode, the inner MultiViewCalendar should handle the disabled class and aria attr
463
+ return this.type === 'classic' ? undefined : this.disabled;
468
464
  },
469
465
  enumerable: true,
470
466
  configurable: true
@@ -550,19 +546,23 @@ var CalendarComponent = /** @class */ (function () {
550
546
  * ```
551
547
  */
552
548
  CalendarComponent.prototype.focus = function () {
553
- if (!this.element) {
554
- return;
549
+ var focusTarget = this.type === 'infinite' ?
550
+ this.element && this.element.nativeElement :
551
+ this.multiViewCalendar;
552
+ if (isPresent(focusTarget)) {
553
+ focusTarget.focus();
555
554
  }
556
- this.element.nativeElement.focus();
557
555
  };
558
556
  /**
559
557
  * Blurs the Calendar component.
560
558
  */
561
559
  CalendarComponent.prototype.blur = function () {
562
- if (!this.element) {
563
- return;
560
+ var blurTarget = this.type === 'infinite' ?
561
+ this.element && this.element.nativeElement :
562
+ this.multiViewCalendar;
563
+ if (isPresent(blurTarget)) {
564
+ blurTarget.blur();
564
565
  }
565
- this.element.nativeElement.blur();
566
566
  };
567
567
  /**
568
568
  * @hidden
@@ -745,6 +745,39 @@ var CalendarComponent = /** @class */ (function () {
745
745
  });
746
746
  });
747
747
  };
748
+ /**
749
+ * @hidden
750
+ */
751
+ CalendarComponent.prototype.handleBlur = function (args) {
752
+ var _this = this;
753
+ if (this.element.nativeElement.contains(args.relatedTarget)) {
754
+ return;
755
+ }
756
+ this.isActive = false;
757
+ // the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
758
+ // and enters the zone for no reason because the parent component is still untouched
759
+ if (!this.pickerService && requiresZoneOnBlur(this.control)) {
760
+ this.ngZone.run(function () {
761
+ _this.onControlTouched();
762
+ _this.emitBlur(args);
763
+ _this.cdr.markForCheck();
764
+ });
765
+ }
766
+ else {
767
+ this.emitBlur(args);
768
+ this.detectChanges();
769
+ }
770
+ };
771
+ /**
772
+ * @hidden
773
+ */
774
+ CalendarComponent.prototype.handleFocus = function () {
775
+ this.isActive = true;
776
+ if (!NgZone.isInAngularZone()) {
777
+ this.detectChanges();
778
+ }
779
+ this.emitFocus();
780
+ };
748
781
  CalendarComponent.prototype.setClasses = function (element) {
749
782
  this.renderer.addClass(element, 'k-widget');
750
783
  this.renderer.addClass(element, 'k-calendar');
@@ -789,30 +822,6 @@ var CalendarComponent = /** @class */ (function () {
789
822
  this.pickerService.onFocus.emit();
790
823
  }
791
824
  };
792
- CalendarComponent.prototype.handleBlur = function (args) {
793
- var _this = this;
794
- this.isActive = false;
795
- // the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
796
- // and enters the zone for no reason because the parent component is still untouched
797
- if (!this.pickerService && requiresZoneOnBlur(this.control)) {
798
- this.ngZone.run(function () {
799
- _this.onControlTouched();
800
- _this.emitBlur(args);
801
- _this.cdr.markForCheck();
802
- });
803
- }
804
- else {
805
- this.emitBlur(args);
806
- this.detectChanges();
807
- }
808
- };
809
- CalendarComponent.prototype.handleFocus = function () {
810
- this.isActive = true;
811
- if (!NgZone.isInAngularZone()) {
812
- this.detectChanges();
813
- }
814
- this.emitFocus();
815
- };
816
825
  CalendarComponent.prototype.handleComponentClick = function () {
817
826
  if (!this.isActive) {
818
827
  if (this.type === 'infinite' && this.monthView.isScrolled()) {
@@ -849,7 +858,12 @@ var CalendarComponent = /** @class */ (function () {
849
858
  }
850
859
  };
851
860
  CalendarComponent.prototype.setAriaActivedescendant = function () {
852
- if (!isPresent(this.element)) {
861
+ // in Classic mode, the inner MultiViewCalendar handles the activedescendant
862
+ if (!isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
863
+ return;
864
+ }
865
+ if (this.type === 'classic') {
866
+ this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
853
867
  return;
854
868
  }
855
869
  var focusedCellId = this.cellUID + this.focusedDate.getTime();
@@ -1050,16 +1064,15 @@ var CalendarComponent = /** @class */ (function () {
1050
1064
  ViewChild(ViewListComponent, { static: false }),
1051
1065
  tslib_1.__metadata("design:type", ViewListComponent)
1052
1066
  ], CalendarComponent.prototype, "monthView", void 0);
1067
+ tslib_1.__decorate([
1068
+ ViewChild(MultiViewCalendarComponent, { static: false }),
1069
+ tslib_1.__metadata("design:type", MultiViewCalendarComponent)
1070
+ ], CalendarComponent.prototype, "multiViewCalendar", void 0);
1053
1071
  tslib_1.__decorate([
1054
1072
  HostBinding('attr.id'),
1055
1073
  tslib_1.__metadata("design:type", String),
1056
1074
  tslib_1.__metadata("design:paramtypes", [])
1057
1075
  ], CalendarComponent.prototype, "widgetId", null);
1058
- tslib_1.__decorate([
1059
- HostBinding('attr.role'),
1060
- tslib_1.__metadata("design:type", String),
1061
- tslib_1.__metadata("design:paramtypes", [])
1062
- ], CalendarComponent.prototype, "widgetRole", null);
1063
1076
  tslib_1.__decorate([
1064
1077
  HostBinding('attr.tabindex'),
1065
1078
  tslib_1.__metadata("design:type", Number),
@@ -1091,7 +1104,7 @@ var CalendarComponent = /** @class */ (function () {
1091
1104
  SelectionService
1092
1105
  ],
1093
1106
  selector: 'kendo-calendar',
1094
- template: "\n <ng-container kendoCalendarLocalizedMessages\n i18n-today=\"kendo.calendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.calendar.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <ng-container *ngIf=\"type === 'infinite'\">\n <kendo-calendar-navigation\n *ngIf=\"navigation\"\n [activeView]=\"activeViewEnum\"\n [focusedDate]=\"focusedDate\"\n [min]=\"min\"\n [max]=\"max\"\n [templateRef]=\"navigationItemTemplate?.templateRef\"\n (valueChange)=\"handleNavigation($event)\"\n (pageChange)=\"onPageChange()\"\n >\n </kendo-calendar-navigation>\n <kendo-calendar-viewlist\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [headerTitleTemplateRef]=\"headerTitleTemplate?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [selectedDates]=\"selectedDates\"\n (todayButtonClick)=\"handleDateChange({\n selectedDates: [$event],\n focusedDate: $event\n })\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (activeDateChange)=\"handleActiveDateChange($event)\"\n (pageChange)=\"onPageChange()\"\n >\n </kendo-calendar-viewlist>\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-container>\n <ng-container *ngIf=\"type === 'classic'\">\n <kendo-multiviewcalendar\n #multiviewcalendar\n [views]=\"1\"\n [min]=\"min\"\n [max]=\"max\"\n [isActive]=\"isActive\"\n [activeView]=\"activeView\"\n [bottomView]=\"bottomView\"\n [topView]=\"topView\"\n [weekNumber]=\"weekNumber\"\n [animateNavigation]=\"animateNavigation\"\n [cellTemplate]=\"activeCellTemplate()\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [focusedDate]=\"focusedDate\"\n [selection]=\"selection\"\n [value]=\"value\"\n [disabledDates]=\"disabledDates\"\n (activeViewChange)=\"handleActiveViewChange($event)\"\n (navigate)=\"navigate.emit($event)\"\n (valueChange)=\"handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)\"\n >\n <kendo-multiviewcalendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-multiviewcalendar-messages>\n </kendo-multiviewcalendar>\n </ng-container>\n "
1107
+ template: "\n <ng-container kendoCalendarLocalizedMessages\n i18n-today=\"kendo.calendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.calendar.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <ng-container *ngIf=\"type === 'infinite'\">\n <kendo-calendar-navigation\n *ngIf=\"navigation\"\n [activeView]=\"activeViewEnum\"\n [focusedDate]=\"focusedDate\"\n [min]=\"min\"\n [max]=\"max\"\n [templateRef]=\"navigationItemTemplate?.templateRef\"\n (valueChange)=\"handleNavigation($event)\"\n (pageChange)=\"onPageChange()\"\n >\n </kendo-calendar-navigation>\n <kendo-calendar-viewlist\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [headerTitleTemplateRef]=\"headerTitleTemplate?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [selectedDates]=\"selectedDates\"\n (todayButtonClick)=\"handleDateChange({\n selectedDates: [$event],\n focusedDate: $event\n })\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (activeDateChange)=\"handleActiveDateChange($event)\"\n (pageChange)=\"onPageChange()\"\n >\n </kendo-calendar-viewlist>\n <kendo-resize-sensor (resize)=\"onResize()\"></kendo-resize-sensor>\n </ng-container>\n <ng-container *ngIf=\"type === 'classic'\">\n <kendo-multiviewcalendar\n #multiviewcalendar\n [views]=\"1\"\n [min]=\"min\"\n [max]=\"max\"\n [isActive]=\"isActive\"\n [activeView]=\"activeView\"\n [bottomView]=\"bottomView\"\n [topView]=\"topView\"\n [weekNumber]=\"weekNumber\"\n [animateNavigation]=\"animateNavigation\"\n [cellTemplate]=\"activeCellTemplate()\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [focusedDate]=\"focusedDate\"\n [selection]=\"selection\"\n [value]=\"value\"\n [disabledDates]=\"disabledDates\"\n (activeViewChange)=\"handleActiveViewChange($event)\"\n (navigate)=\"navigate.emit($event)\"\n (valueChange)=\"handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)\"\n (focus)=\"handleFocus()\"\n (blur)=\"handleBlur($event)\"\n >\n <kendo-multiviewcalendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-multiviewcalendar-messages>\n </kendo-multiviewcalendar>\n </ng-container>\n "
1095
1108
  }),
1096
1109
  tslib_1.__param(12, Optional()),
1097
1110
  tslib_1.__metadata("design:paramtypes", [BusViewService,
@@ -349,7 +349,7 @@ var HorizontalViewListComponent = /** @class */ (function () {
349
349
  Component({
350
350
  changeDetection: ChangeDetectionStrategy.OnPush,
351
351
  selector: 'kendo-calendar-horizontal',
352
- template: "\n <ng-template #tableTemplate let-date=\"date\" let-class=\"className\">\n <table\n class=\"k-content k-calendar-content k-calendar-table\"\n [ngClass]=\"class\"\n >\n <caption *ngIf=\"showViewHeader\" [ngClass]=\"getCaptionClass()\">{{ getCaptionTitle(date) }}</caption>\n <thead *ngIf=\"isMonthView()\" class=\"k-calendar-thead\">\n <tr class=\"k-calendar-tr\" role=\"row\">\n <th *ngFor=\"let name of weekNames\" class=\"k-calendar-th\">{{name}}</th>\n </tr>\n </thead>\n <tbody\n class=\"k-calendar-tbody\"\n kendoCalendarView\n role=\"rowgroup\"\n direction=\"horizontal\"\n [activeView]=\"activeView\"\n [isActive]=\"isActive\"\n [min]=\"min\"\n [max]=\"max\"\n [cellUID]=\"cellUID\"\n [focusedDate]=\"focusedDate\"\n [selectedDates]=\"selectedDates\"\n [selectionRange]=\"selectionRange\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [weekNumber]=\"weekNumber\"\n [templateRef]=\"cellTemplateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplateRef\"\n [viewDate]=\"date\"\n (cellClick)=\"cellClick.emit($event)\"\n (weekNumberCellClick)=\"weekNumberCellClick.emit($event)\"\n (cellEnter)=\"cellEnter.emit($event)\"\n (cellLeave)=\"cellLeave.emit($event)\"\n >\n </tbody>\n </table>\n </ng-template>\n\n <!-- When Next is clicked a placeholder table is rendered before the Main Table -->\n <ng-template\n *ngIf=\"nextAnimationDate\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: nextAnimationDate,\n className: 'k-pointer-events-none'\n }\"\n >\n </ng-template>\n\n <ng-template\n *kFor=\"let date of dates\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: date\n }\"\n >\n </ng-template>\n\n <!-- When Prev is clicked a placeholder table is rendered after the Main Table -->\n <ng-template\n *ngIf=\"prevAnimationDate\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: prevAnimationDate,\n className: 'k-pointer-events-none'\n }\"\n >\n </ng-template>\n "
352
+ template: "\n <ng-template #tableTemplate let-date=\"date\" let-class=\"className\">\n <table\n role=\"grid\"\n class=\"k-content k-calendar-content k-calendar-table\"\n [ngClass]=\"class\"\n >\n <caption *ngIf=\"showViewHeader\" [ngClass]=\"getCaptionClass()\">{{ getCaptionTitle(date) }}</caption>\n <thead *ngIf=\"isMonthView()\" class=\"k-calendar-thead\">\n <tr class=\"k-calendar-tr\" role=\"row\">\n <th *ngFor=\"let name of weekNames\" class=\"k-calendar-th\">{{name}}</th>\n </tr>\n </thead>\n <tbody\n class=\"k-calendar-tbody\"\n kendoCalendarView\n role=\"rowgroup\"\n direction=\"horizontal\"\n [activeView]=\"activeView\"\n [isActive]=\"isActive\"\n [min]=\"min\"\n [max]=\"max\"\n [cellUID]=\"cellUID\"\n [focusedDate]=\"focusedDate\"\n [selectedDates]=\"selectedDates\"\n [selectionRange]=\"selectionRange\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [weekNumber]=\"weekNumber\"\n [templateRef]=\"cellTemplateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplateRef\"\n [viewDate]=\"date\"\n (cellClick)=\"cellClick.emit($event)\"\n (weekNumberCellClick)=\"weekNumberCellClick.emit($event)\"\n (cellEnter)=\"cellEnter.emit($event)\"\n (cellLeave)=\"cellLeave.emit($event)\"\n >\n </tbody>\n </table>\n </ng-template>\n\n <!-- When Next is clicked a placeholder table is rendered before the Main Table -->\n <ng-template\n *ngIf=\"nextAnimationDate\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: nextAnimationDate,\n className: 'k-pointer-events-none'\n }\"\n >\n </ng-template>\n\n <ng-template\n *kFor=\"let date of dates\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: date\n }\"\n >\n </ng-template>\n\n <!-- When Prev is clicked a placeholder table is rendered after the Main Table -->\n <ng-template\n *ngIf=\"prevAnimationDate\"\n [ngTemplateOutlet]=\"tableTemplate\"\n [ngTemplateOutletContext]=\"{\n date: prevAnimationDate,\n className: 'k-pointer-events-none'\n }\"\n >\n </ng-template>\n "
353
353
  }),
354
354
  tslib_1.__metadata("design:paramtypes", [BusViewService,
355
355
  IntlService,
@@ -10,6 +10,7 @@ import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
10
10
  import { cloneDate, isEqual } from '@progress/kendo-date-math';
11
11
  import { hasObservers, guid, Keys } from '@progress/kendo-angular-common';
12
12
  import { HorizontalViewListComponent } from './horizontal-view-list.component';
13
+ import { HeaderComponent } from './header.component';
13
14
  import { BusViewService } from './services/bus-view.service';
14
15
  import { NavigationService } from './services/navigation.service';
15
16
  import { SelectionService } from './services/selection.service';
@@ -114,6 +115,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
114
115
  * @hidden
115
116
  */
116
117
  this.isActive = false;
118
+ /**
119
+ * @hidden
120
+ */
121
+ this.isHeaderActive = false;
117
122
  /**
118
123
  * Defines the active view that the Calendar initially renders
119
124
  * ([see example]({% slug activeview_multiviewcalendar %})).
@@ -178,6 +183,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
178
183
  * ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
179
184
  */
180
185
  this.valueChange = new EventEmitter();
186
+ /**
187
+ * @hidden
188
+ */
189
+ this.blurEvent = new EventEmitter();
181
190
  this.cellUID = guid();
182
191
  this.isHovered = false;
183
192
  this.isPrevDisabled = true;
@@ -413,13 +422,6 @@ var MultiViewCalendarComponent = /** @class */ (function () {
413
422
  enumerable: true,
414
423
  configurable: true
415
424
  });
416
- Object.defineProperty(MultiViewCalendarComponent.prototype, "widgetRole", {
417
- get: function () {
418
- return 'grid';
419
- },
420
- enumerable: true,
421
- configurable: true
422
- });
423
425
  Object.defineProperty(MultiViewCalendarComponent.prototype, "calendarTabIndex", {
424
426
  get: function () {
425
427
  return this.disabled ? undefined : this.tabIndex;
@@ -444,10 +446,15 @@ var MultiViewCalendarComponent = /** @class */ (function () {
444
446
  /**
445
447
  * @hidden
446
448
  */
447
- MultiViewCalendarComponent.prototype.handleBlur = function () {
448
- this.onControlTouched();
449
+ MultiViewCalendarComponent.prototype.handleBlur = function (event) {
450
+ var target = event.target;
451
+ if (!this.element.nativeElement.contains(event.relatedTarget)) {
452
+ this.blurEvent.emit(event);
453
+ this.onControlTouched();
454
+ }
449
455
  this.isActive = false;
450
456
  this.isHovered = false; //ensure that hovered is also not active
457
+ this.isHeaderActive = this.headerElement.nativeElement.contains(target);
451
458
  };
452
459
  /**
453
460
  * @hidden
@@ -885,6 +892,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
885
892
  Output(),
886
893
  tslib_1.__metadata("design:type", EventEmitter)
887
894
  ], MultiViewCalendarComponent.prototype, "valueChange", void 0);
895
+ tslib_1.__decorate([
896
+ Output('blur'),
897
+ tslib_1.__metadata("design:type", EventEmitter)
898
+ ], MultiViewCalendarComponent.prototype, "blurEvent", void 0);
888
899
  tslib_1.__decorate([
889
900
  ContentChild(CellTemplateDirective, { static: true }),
890
901
  tslib_1.__metadata("design:type", CellTemplateDirective)
@@ -948,6 +959,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
948
959
  tslib_1.__metadata("design:type", HeaderTitleTemplateDirective),
949
960
  tslib_1.__metadata("design:paramtypes", [HeaderTitleTemplateDirective])
950
961
  ], MultiViewCalendarComponent.prototype, "headerTitleTemplateRef", null);
962
+ tslib_1.__decorate([
963
+ ViewChild(HeaderComponent, { static: false, read: ElementRef }),
964
+ tslib_1.__metadata("design:type", ElementRef)
965
+ ], MultiViewCalendarComponent.prototype, "headerElement", void 0);
951
966
  tslib_1.__decorate([
952
967
  ViewChild(HorizontalViewListComponent, { static: false }),
953
968
  tslib_1.__metadata("design:type", HorizontalViewListComponent)
@@ -957,11 +972,6 @@ var MultiViewCalendarComponent = /** @class */ (function () {
957
972
  tslib_1.__metadata("design:type", String),
958
973
  tslib_1.__metadata("design:paramtypes", [])
959
974
  ], MultiViewCalendarComponent.prototype, "widgetId", null);
960
- tslib_1.__decorate([
961
- HostBinding('attr.role'),
962
- tslib_1.__metadata("design:type", String),
963
- tslib_1.__metadata("design:paramtypes", [])
964
- ], MultiViewCalendarComponent.prototype, "widgetRole", null);
965
975
  tslib_1.__decorate([
966
976
  HostBinding('attr.tabindex'),
967
977
  tslib_1.__metadata("design:type", Number),
@@ -979,9 +989,9 @@ var MultiViewCalendarComponent = /** @class */ (function () {
979
989
  tslib_1.__metadata("design:paramtypes", [])
980
990
  ], MultiViewCalendarComponent.prototype, "ariaActivedescendant", null);
981
991
  tslib_1.__decorate([
982
- HostListener("blur"),
992
+ HostListener('focusout', ['$event']),
983
993
  tslib_1.__metadata("design:type", Function),
984
- tslib_1.__metadata("design:paramtypes", []),
994
+ tslib_1.__metadata("design:paramtypes", [FocusEvent]),
985
995
  tslib_1.__metadata("design:returntype", void 0)
986
996
  ], MultiViewCalendarComponent.prototype, "handleBlur", null);
987
997
  tslib_1.__decorate([
@@ -1038,7 +1048,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
1038
1048
  SelectionService
1039
1049
  ],
1040
1050
  selector: 'kendo-multiviewcalendar',
1041
- template: "\n <ng-container kendoMultiViewCalendarLocalizedMessages\n i18n-today=\"kendo.multiviewcalendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-calendar-header\n [activeView]=\"activeViewEnum\"\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [rangeLength]=\"views\"\n [templateRef]=\"headerTitleTemplate?.templateRef\"\n [isPrevDisabled]=\"isPrevDisabled\"\n [isNextDisabled]=\"isNextDisabled\"\n [showNavigationButtons]=\"true\"\n (todayButtonClick)=\"handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })\"\n (prevButtonClick)=\"navigateView(prevView)\"\n (nextButtonClick)=\"navigateView(nextView)\"\n >\n </kendo-calendar-header>\n <kendo-calendar-horizontal\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive || isHovered\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [views]=\"views\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [animateNavigation]=\"animateNavigation\"\n [showViewHeader]=\"showViewHeader\"\n [weekNumber]=\"weekNumber\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [selectionRange]=\"selectionRange\"\n [selectedDates]=\"selectedDates\"\n (valueChange)=\"handleDateChange($event)\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (cellEnter)=\"emitCellEvent(cellEnter, $event)\"\n (cellLeave)=\"emitCellEvent(cellLeave, $event)\"\n (activeDateChange)=\"setActiveDate($event)\"\n >\n </kendo-calendar-horizontal>\n "
1051
+ template: "\n <ng-container kendoMultiViewCalendarLocalizedMessages\n i18n-today=\"kendo.multiviewcalendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-calendar-header\n [activeView]=\"activeViewEnum\"\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [rangeLength]=\"views\"\n [templateRef]=\"headerTitleTemplate?.templateRef\"\n [isPrevDisabled]=\"isPrevDisabled\"\n [isNextDisabled]=\"isNextDisabled\"\n [showNavigationButtons]=\"true\"\n (todayButtonClick)=\"handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })\"\n (prevButtonClick)=\"navigateView(prevView)\"\n (nextButtonClick)=\"navigateView(nextView)\"\n >\n </kendo-calendar-header>\n <kendo-calendar-horizontal\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive || (isHovered && !isHeaderActive)\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [views]=\"views\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [animateNavigation]=\"animateNavigation\"\n [showViewHeader]=\"showViewHeader\"\n [weekNumber]=\"weekNumber\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [selectionRange]=\"selectionRange\"\n [selectedDates]=\"selectedDates\"\n (valueChange)=\"handleDateChange($event)\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (cellEnter)=\"emitCellEvent(cellEnter, $event)\"\n (cellLeave)=\"emitCellEvent(cellLeave, $event)\"\n (activeDateChange)=\"setActiveDate($event)\"\n >\n </kendo-calendar-horizontal>\n "
1042
1052
  }),
1043
1053
  tslib_1.__metadata("design:paramtypes", [BusViewService,
1044
1054
  ElementRef,
@@ -287,7 +287,7 @@ var ViewListComponent = /** @class */ (function () {
287
287
  Component({
288
288
  changeDetection: ChangeDetectionStrategy.OnPush,
289
289
  selector: 'kendo-calendar-viewlist',
290
- template: "\n <kendo-calendar-header\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [activeView]=\"activeView\"\n [templateRef]=\"headerTitleTemplateRef\"\n (todayButtonClick)=\"todayButtonClick.emit($event)\"\n >\n </kendo-calendar-header>\n <table class=\"k-calendar-weekdays k-calendar-table\" style=\"table-layout: auto;\" *ngIf=\"isMonthView()\">\n <thead class=\"k-calendar-thead\">\n <tr class=\"k-calendar-tr\">\n <th class=\"k-calendar-th\" *ngFor=\"let name of weekNames\" [style.width.%]=\"colWidth\">{{name}}</th>\n </tr>\n </thead>\n </table>\n <kendo-virtualization\n [tabindex]=\"-1\"\n [skip]=\"skip\"\n [take]=\"take\"\n [total]=\"total\"\n [itemHeight]=\"viewHeight\"\n [topOffset]=\"viewOffset\"\n [bottomOffset]=\"bottomOffset\"\n [scrollOffsetSize]=\"viewOffset\"\n [maxScrollDifference]=\"viewHeight\"\n (pageChange)=\"onPageChange($event)\"\n (scrollChange)=\"scrollChange($event)\"\n (activeIndexChange)=\"setActiveDate($event)\"\n >\n <table class=\"k-calendar-table\" #list>\n <colgroup><col *ngFor=\"let _ of cols\" /></colgroup>\n\n <tbody class=\"k-calendar-tbody\"\n *kFor=\"let date of dates\"\n kendoCalendarView\n role=\"rowgroup\"\n [activeView]=\"activeView\"\n [isActive]=\"isActive\"\n [min]=\"min\" [max]=\"max\"\n [cellUID]=\"cellUID\"\n [focusedDate]=\"focusedDate\"\n [selectedDates]=\"selectedDates\"\n [weekNumber]=\"weekNumber\"\n [templateRef]=\"cellTemplateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplateRef\"\n [viewDate]=\"date\"\n (cellClick)=\"cellClick.emit($event)\"\n (weekNumberCellClick)=\"weekNumberCellClick.emit($event)\"\n ></tbody>\n </table>\n </kendo-virtualization>\n "
290
+ template: "\n <kendo-calendar-header\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [activeView]=\"activeView\"\n [templateRef]=\"headerTitleTemplateRef\"\n (todayButtonClick)=\"todayButtonClick.emit($event)\"\n >\n </kendo-calendar-header>\n <table class=\"k-calendar-weekdays k-calendar-table\" style=\"table-layout: auto;\" *ngIf=\"isMonthView()\">\n <thead class=\"k-calendar-thead\">\n <tr class=\"k-calendar-tr\">\n <th class=\"k-calendar-th\" *ngFor=\"let name of weekNames\" [style.width.%]=\"colWidth\">{{name}}</th>\n </tr>\n </thead>\n </table>\n <kendo-virtualization\n [tabindex]=\"-1\"\n [skip]=\"skip\"\n [take]=\"take\"\n [total]=\"total\"\n [itemHeight]=\"viewHeight\"\n [topOffset]=\"viewOffset\"\n [bottomOffset]=\"bottomOffset\"\n [scrollOffsetSize]=\"viewOffset\"\n [maxScrollDifference]=\"viewHeight\"\n (pageChange)=\"onPageChange($event)\"\n (scrollChange)=\"scrollChange($event)\"\n (activeIndexChange)=\"setActiveDate($event)\"\n >\n <table\n #list\n role=\"grid\"\n class=\"k-calendar-table\"\n >\n <colgroup><col *ngFor=\"let _ of cols\" /></colgroup>\n\n <tbody class=\"k-calendar-tbody\"\n *kFor=\"let date of dates\"\n kendoCalendarView\n role=\"rowgroup\"\n [activeView]=\"activeView\"\n [isActive]=\"isActive\"\n [min]=\"min\" [max]=\"max\"\n [cellUID]=\"cellUID\"\n [focusedDate]=\"focusedDate\"\n [selectedDates]=\"selectedDates\"\n [weekNumber]=\"weekNumber\"\n [templateRef]=\"cellTemplateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplateRef\"\n [viewDate]=\"date\"\n (cellClick)=\"cellClick.emit($event)\"\n (weekNumberCellClick)=\"weekNumberCellClick.emit($event)\"\n ></tbody>\n </table>\n </kendo-virtualization>\n "
291
291
  }),
292
292
  tslib_1.__metadata("design:paramtypes", [BusViewService,
293
293
  ChangeDetectorRef,
@@ -27,7 +27,7 @@ import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title
27
27
  import { NavigationItemTemplateDirective } from '../calendar/templates/navigation-item-template.directive';
28
28
  import { PickerService } from '../common/picker.service';
29
29
  import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
30
- import { noop, isValidRange, setTime, isWindowAvailable } from '../util';
30
+ import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar } from '../util';
31
31
  import { TOUCH_ENABLED } from '../touch-enabled';
32
32
  import { requiresZoneOnBlur, currentFocusTarget } from '../common/utils';
33
33
  import { fromEvent } from 'rxjs';
@@ -120,11 +120,13 @@ var DatePickerComponent = /** @class */ (function () {
120
120
  /**
121
121
  * Specifies the smallest valid date
122
122
  * ([see example]({% slug dateranges_datepicker %})).
123
+ * By default, the `min` value is `1900-1-1`.
123
124
  */
124
125
  this.min = cloneDate(MIN_DATE);
125
126
  /**
126
127
  * Specifies the biggest valid date
127
128
  * ([see example]({% slug dateranges_datepicker %})).
129
+ * By default, the `max` value is `2099-12-31`.
128
130
  */
129
131
  this.max = cloneDate(MAX_DATE);
130
132
  /**
@@ -716,7 +718,7 @@ var DatePickerComponent = /** @class */ (function () {
716
718
  * @hidden
717
719
  */
718
720
  DatePickerComponent.prototype.handleKeydown = function (e) {
719
- var altKey = e.altKey, keyCode = e.keyCode;
721
+ var altKey = e.altKey, shiftKey = e.shiftKey, keyCode = e.keyCode, target = e.target;
720
722
  if (keyCode === Keys.Escape) {
721
723
  this.show = false;
722
724
  }
@@ -728,7 +730,7 @@ var DatePickerComponent = /** @class */ (function () {
728
730
  this.show = false;
729
731
  }
730
732
  }
731
- if (keyCode === Keys.Tab && this.show && this.calendar.isActive) {
733
+ if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
732
734
  this.input.focus();
733
735
  this.show = false;
734
736
  }
@@ -9,7 +9,7 @@ export var packageMetadata = {
9
9
  name: '@progress/kendo-angular-dateinputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1635945725,
12
+ publishDate: 1638381906,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
package/dist/es/util.js CHANGED
@@ -340,4 +340,19 @@ export var millisecondDigitsInFormat = function (format) {
340
340
  export var millisecondStepFor = function (digits) {
341
341
  return Math.pow(10, 3 - digits);
342
342
  };
343
+ /**
344
+ * @hidden
345
+ *
346
+ * Checks if a tab keydown would would move the focus outside of the calendar.
347
+ */
348
+ export var isTabExitingCalendar = function (calendarType, focusedElement, shiftKey) {
349
+ if (!isPresent(focusedElement)) {
350
+ return false;
351
+ }
352
+ return calendarType === 'infinite' || ( // infinte calendar is always exited on first tab keydown
353
+ calendarType === 'classic' &&
354
+ (shiftKey && focusedElement.classList.contains('k-calendar')) || // exited on main calendar element focused and back-tab
355
+ (!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
356
+ );
357
+ };
343
358
  export { ɵ0, ɵ1, ɵ2 };
@@ -6,6 +6,7 @@ import { ChangeDetectorRef, EventEmitter, ElementRef, Renderer2, AfterViewChecke
6
6
  import { AbstractControl, ControlValueAccessor, Validator } from '@angular/forms';
7
7
  import { LocalizationService } from '@progress/kendo-angular-l10n';
8
8
  import { Day } from '@progress/kendo-date-math';
9
+ import { MultiViewCalendarComponent } from './multiview-calendar.component';
9
10
  import { NavigationComponent } from './navigation.component';
10
11
  import { ViewListComponent } from './view-list.component';
11
12
  import { CalendarDOMService } from './services/dom.service';
@@ -273,6 +274,7 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
273
274
  navigationItemTemplateRef: NavigationItemTemplateDirective;
274
275
  navigationView: NavigationComponent;
275
276
  monthView: ViewListComponent;
277
+ multiViewCalendar: MultiViewCalendarComponent;
276
278
  isActive: boolean;
277
279
  cellUID: string;
278
280
  selectedDates: Date[];
@@ -294,7 +296,6 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
294
296
  readonly bottomViewEnum: CalendarViewEnum;
295
297
  readonly topViewEnum: CalendarViewEnum;
296
298
  readonly widgetId: string;
297
- readonly widgetRole: string;
298
299
  readonly calendarTabIndex: number;
299
300
  readonly ariaDisabled: boolean;
300
301
  private domEvents;
@@ -408,14 +409,20 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
408
409
  * @hidden
409
410
  */
410
411
  handleWeekNumberClick(dates: Date[]): void;
412
+ /**
413
+ * @hidden
414
+ */
415
+ handleBlur(args: any): void;
416
+ /**
417
+ * @hidden
418
+ */
419
+ handleFocus(): void;
411
420
  private setClasses;
412
421
  private verifyChanges;
413
422
  private verifyValue;
414
423
  private bindEvents;
415
424
  private emitBlur;
416
425
  private emitFocus;
417
- private handleBlur;
418
- private handleFocus;
419
426
  private handleComponentClick;
420
427
  private handleKeydown;
421
428
  private detectChanges;
@@ -11,6 +11,7 @@ import { cloneDate, isEqual } from '@progress/kendo-date-math';
11
11
  import { hasObservers, KendoInput, guid, Keys } from '@progress/kendo-angular-common';
12
12
  import { validatePackage } from '@progress/kendo-licensing';
13
13
  import { packageMetadata } from '../package-metadata';
14
+ import { MultiViewCalendarComponent } from './multiview-calendar.component';
14
15
  import { NavigationComponent } from './navigation.component';
15
16
  import { ViewListComponent } from './view-list.component';
16
17
  import { CalendarDOMService } from './services/dom.service';
@@ -372,14 +373,13 @@ let CalendarComponent = class CalendarComponent {
372
373
  get widgetId() {
373
374
  return this.id;
374
375
  }
375
- get widgetRole() {
376
- return 'grid';
377
- }
378
376
  get calendarTabIndex() {
377
+ // in Classic mode, the inner MultiViewCalendar is the focusable element
379
378
  return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
380
379
  }
381
380
  get ariaDisabled() {
382
- return this.disabled;
381
+ // in Classic mode, the inner MultiViewCalendar should handle the disabled class and aria attr
382
+ return this.type === 'classic' ? undefined : this.disabled;
383
383
  }
384
384
  ngOnInit() {
385
385
  this.dom.calculateHeights(this.element.nativeElement);
@@ -458,19 +458,23 @@ let CalendarComponent = class CalendarComponent {
458
458
  * ```
459
459
  */
460
460
  focus() {
461
- if (!this.element) {
462
- return;
461
+ const focusTarget = this.type === 'infinite' ?
462
+ this.element && this.element.nativeElement :
463
+ this.multiViewCalendar;
464
+ if (isPresent(focusTarget)) {
465
+ focusTarget.focus();
463
466
  }
464
- this.element.nativeElement.focus();
465
467
  }
466
468
  /**
467
469
  * Blurs the Calendar component.
468
470
  */
469
471
  blur() {
470
- if (!this.element) {
471
- return;
472
+ const blurTarget = this.type === 'infinite' ?
473
+ this.element && this.element.nativeElement :
474
+ this.multiViewCalendar;
475
+ if (isPresent(blurTarget)) {
476
+ blurTarget.blur();
472
477
  }
473
- this.element.nativeElement.blur();
474
478
  }
475
479
  /**
476
480
  * @hidden
@@ -648,6 +652,38 @@ let CalendarComponent = class CalendarComponent {
648
652
  });
649
653
  });
650
654
  }
655
+ /**
656
+ * @hidden
657
+ */
658
+ handleBlur(args) {
659
+ if (this.element.nativeElement.contains(args.relatedTarget)) {
660
+ return;
661
+ }
662
+ this.isActive = false;
663
+ // the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
664
+ // and enters the zone for no reason because the parent component is still untouched
665
+ if (!this.pickerService && requiresZoneOnBlur(this.control)) {
666
+ this.ngZone.run(() => {
667
+ this.onControlTouched();
668
+ this.emitBlur(args);
669
+ this.cdr.markForCheck();
670
+ });
671
+ }
672
+ else {
673
+ this.emitBlur(args);
674
+ this.detectChanges();
675
+ }
676
+ }
677
+ /**
678
+ * @hidden
679
+ */
680
+ handleFocus() {
681
+ this.isActive = true;
682
+ if (!NgZone.isInAngularZone()) {
683
+ this.detectChanges();
684
+ }
685
+ this.emitFocus();
686
+ }
651
687
  setClasses(element) {
652
688
  this.renderer.addClass(element, 'k-widget');
653
689
  this.renderer.addClass(element, 'k-calendar');
@@ -692,29 +728,6 @@ let CalendarComponent = class CalendarComponent {
692
728
  this.pickerService.onFocus.emit();
693
729
  }
694
730
  }
695
- handleBlur(args) {
696
- this.isActive = false;
697
- // the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
698
- // and enters the zone for no reason because the parent component is still untouched
699
- if (!this.pickerService && requiresZoneOnBlur(this.control)) {
700
- this.ngZone.run(() => {
701
- this.onControlTouched();
702
- this.emitBlur(args);
703
- this.cdr.markForCheck();
704
- });
705
- }
706
- else {
707
- this.emitBlur(args);
708
- this.detectChanges();
709
- }
710
- }
711
- handleFocus() {
712
- this.isActive = true;
713
- if (!NgZone.isInAngularZone()) {
714
- this.detectChanges();
715
- }
716
- this.emitFocus();
717
- }
718
731
  handleComponentClick() {
719
732
  if (!this.isActive) {
720
733
  if (this.type === 'infinite' && this.monthView.isScrolled()) {
@@ -751,7 +764,12 @@ let CalendarComponent = class CalendarComponent {
751
764
  }
752
765
  }
753
766
  setAriaActivedescendant() {
754
- if (!isPresent(this.element)) {
767
+ // in Classic mode, the inner MultiViewCalendar handles the activedescendant
768
+ if (!isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
769
+ return;
770
+ }
771
+ if (this.type === 'classic') {
772
+ this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
755
773
  return;
756
774
  }
757
775
  const focusedCellId = this.cellUID + this.focusedDate.getTime();
@@ -953,16 +971,15 @@ tslib_1.__decorate([
953
971
  ViewChild(ViewListComponent, { static: false }),
954
972
  tslib_1.__metadata("design:type", ViewListComponent)
955
973
  ], CalendarComponent.prototype, "monthView", void 0);
974
+ tslib_1.__decorate([
975
+ ViewChild(MultiViewCalendarComponent, { static: false }),
976
+ tslib_1.__metadata("design:type", MultiViewCalendarComponent)
977
+ ], CalendarComponent.prototype, "multiViewCalendar", void 0);
956
978
  tslib_1.__decorate([
957
979
  HostBinding('attr.id'),
958
980
  tslib_1.__metadata("design:type", String),
959
981
  tslib_1.__metadata("design:paramtypes", [])
960
982
  ], CalendarComponent.prototype, "widgetId", null);
961
- tslib_1.__decorate([
962
- HostBinding('attr.role'),
963
- tslib_1.__metadata("design:type", String),
964
- tslib_1.__metadata("design:paramtypes", [])
965
- ], CalendarComponent.prototype, "widgetRole", null);
966
983
  tslib_1.__decorate([
967
984
  HostBinding('attr.tabindex'),
968
985
  tslib_1.__metadata("design:type", Number),
@@ -1068,6 +1085,8 @@ CalendarComponent = tslib_1.__decorate([
1068
1085
  (activeViewChange)="handleActiveViewChange($event)"
1069
1086
  (navigate)="navigate.emit($event)"
1070
1087
  (valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
1088
+ (focus)="handleFocus()"
1089
+ (blur)="handleBlur($event)"
1071
1090
  >
1072
1091
  <kendo-multiviewcalendar-messages
1073
1092
  [today]="localization.get('today')"
@@ -332,6 +332,7 @@ HorizontalViewListComponent = tslib_1.__decorate([
332
332
  template: `
333
333
  <ng-template #tableTemplate let-date="date" let-class="className">
334
334
  <table
335
+ role="grid"
335
336
  class="k-content k-calendar-content k-calendar-table"
336
337
  [ngClass]="class"
337
338
  >