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

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 (36) 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 +70 -45
  4. package/dist/es/calendar/horizontal-view-list.component.js +1 -1
  5. package/dist/es/calendar/multiview-calendar.component.js +48 -22
  6. package/dist/es/calendar/multiview-calendar.module.js +9 -1
  7. package/dist/es/calendar/view-list.component.js +1 -1
  8. package/dist/es/datepicker/datepicker.component.js +8 -3
  9. package/dist/es/package-metadata.js +1 -1
  10. package/dist/es/util.js +15 -0
  11. package/dist/es2015/calendar/calendar.component.d.ts +17 -3
  12. package/dist/es2015/calendar/calendar.component.js +71 -40
  13. package/dist/es2015/calendar/horizontal-view-list.component.js +1 -0
  14. package/dist/es2015/calendar/multiview-calendar.component.d.ts +17 -3
  15. package/dist/es2015/calendar/multiview-calendar.component.js +52 -18
  16. package/dist/es2015/calendar/multiview-calendar.module.js +9 -1
  17. package/dist/es2015/calendar/view-list.component.js +5 -1
  18. package/dist/es2015/dateinput/dateinput.component.d.ts +2 -0
  19. package/dist/es2015/datepicker/datepicker.component.d.ts +2 -0
  20. package/dist/es2015/datepicker/datepicker.component.js +8 -3
  21. package/dist/es2015/index.metadata.json +1 -1
  22. package/dist/es2015/package-metadata.js +1 -1
  23. package/dist/es2015/util.d.ts +7 -0
  24. package/dist/es2015/util.js +15 -0
  25. package/dist/fesm2015/index.js +7193 -7098
  26. package/dist/fesm5/index.js +6550 -6474
  27. package/dist/npm/calendar/calendar.component.js +70 -45
  28. package/dist/npm/calendar/horizontal-view-list.component.js +1 -1
  29. package/dist/npm/calendar/multiview-calendar.component.js +47 -21
  30. package/dist/npm/calendar/multiview-calendar.module.js +9 -1
  31. package/dist/npm/calendar/view-list.component.js +1 -1
  32. package/dist/npm/datepicker/datepicker.component.js +7 -2
  33. package/dist/npm/package-metadata.js +1 -1
  34. package/dist/npm/util.js +15 -0
  35. package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
  36. 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';
@@ -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
@@ -596,6 +600,14 @@ let CalendarComponent = class CalendarComponent {
596
600
  return null;
597
601
  }
598
602
  }
603
+ /**
604
+ * @hidden
605
+ */
606
+ handleNavigate(event) {
607
+ this.focusedDate = event.focusedDate;
608
+ this.activeView = event.activeView;
609
+ this.emitNavigate(this.focusedDate);
610
+ }
599
611
  /**
600
612
  * @hidden
601
613
  */
@@ -648,6 +660,38 @@ let CalendarComponent = class CalendarComponent {
648
660
  });
649
661
  });
650
662
  }
663
+ /**
664
+ * @hidden
665
+ */
666
+ handleBlur(args) {
667
+ if (this.element.nativeElement.contains(args.relatedTarget)) {
668
+ return;
669
+ }
670
+ this.isActive = false;
671
+ // the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
672
+ // and enters the zone for no reason because the parent component is still untouched
673
+ if (!this.pickerService && requiresZoneOnBlur(this.control)) {
674
+ this.ngZone.run(() => {
675
+ this.onControlTouched();
676
+ this.emitBlur(args);
677
+ this.cdr.markForCheck();
678
+ });
679
+ }
680
+ else {
681
+ this.emitBlur(args);
682
+ this.detectChanges();
683
+ }
684
+ }
685
+ /**
686
+ * @hidden
687
+ */
688
+ handleFocus() {
689
+ this.isActive = true;
690
+ if (!NgZone.isInAngularZone()) {
691
+ this.detectChanges();
692
+ }
693
+ this.emitFocus();
694
+ }
651
695
  setClasses(element) {
652
696
  this.renderer.addClass(element, 'k-widget');
653
697
  this.renderer.addClass(element, 'k-calendar');
@@ -692,29 +736,6 @@ let CalendarComponent = class CalendarComponent {
692
736
  this.pickerService.onFocus.emit();
693
737
  }
694
738
  }
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
739
  handleComponentClick() {
719
740
  if (!this.isActive) {
720
741
  if (this.type === 'infinite' && this.monthView.isScrolled()) {
@@ -725,6 +746,10 @@ let CalendarComponent = class CalendarComponent {
725
746
  }
726
747
  }
727
748
  handleKeydown(args) {
749
+ const headerActive = this.type === 'classic' && this.multiViewCalendar.isHeaderActive;
750
+ if (headerActive) {
751
+ return;
752
+ }
728
753
  // reserve the alt + arrow key commands for the picker
729
754
  const arrowKeyPressed = [Keys.ArrowUp, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowLeft].indexOf(args.keyCode) !== -1;
730
755
  if (isPresent(this.pickerService) && arrowKeyPressed && args.altKey) {
@@ -751,7 +776,12 @@ let CalendarComponent = class CalendarComponent {
751
776
  }
752
777
  }
753
778
  setAriaActivedescendant() {
754
- if (!isPresent(this.element)) {
779
+ // in Classic mode, the inner MultiViewCalendar handles the activedescendant
780
+ if (!isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
781
+ return;
782
+ }
783
+ if (this.type === 'classic') {
784
+ this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
755
785
  return;
756
786
  }
757
787
  const focusedCellId = this.cellUID + this.focusedDate.getTime();
@@ -953,16 +983,15 @@ tslib_1.__decorate([
953
983
  ViewChild(ViewListComponent, { static: false }),
954
984
  tslib_1.__metadata("design:type", ViewListComponent)
955
985
  ], CalendarComponent.prototype, "monthView", void 0);
986
+ tslib_1.__decorate([
987
+ ViewChild(MultiViewCalendarComponent, { static: false }),
988
+ tslib_1.__metadata("design:type", MultiViewCalendarComponent)
989
+ ], CalendarComponent.prototype, "multiViewCalendar", void 0);
956
990
  tslib_1.__decorate([
957
991
  HostBinding('attr.id'),
958
992
  tslib_1.__metadata("design:type", String),
959
993
  tslib_1.__metadata("design:paramtypes", [])
960
994
  ], 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
995
  tslib_1.__decorate([
967
996
  HostBinding('attr.tabindex'),
968
997
  tslib_1.__metadata("design:type", Number),
@@ -1066,8 +1095,10 @@ CalendarComponent = tslib_1.__decorate([
1066
1095
  [value]="value"
1067
1096
  [disabledDates]="disabledDates"
1068
1097
  (activeViewChange)="handleActiveViewChange($event)"
1069
- (navigate)="navigate.emit($event)"
1098
+ (navigate)="handleNavigate($event)"
1070
1099
  (valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
1100
+ (focus)="handleFocus()"
1101
+ (blur)="handleBlur($event)"
1071
1102
  >
1072
1103
  <kendo-multiviewcalendar-messages
1073
1104
  [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
  >
@@ -24,6 +24,7 @@ import { CalendarViewEnum } from './models/view.enum';
24
24
  import { SelectionRangeEnd } from './models/selection-range-end.type';
25
25
  import { SelectionRange } from './models/selection-range.interface';
26
26
  import { CalendarSelection } from './models/selection';
27
+ import { PickerService } from '../common/picker.service';
27
28
  /**
28
29
  * @hidden
29
30
  */
@@ -55,6 +56,7 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
55
56
  private zone;
56
57
  private disabledDatesService;
57
58
  private selectionService;
59
+ private pickerService?;
58
60
  /**
59
61
  * @hidden
60
62
  */
@@ -126,6 +128,10 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
126
128
  * @hidden
127
129
  */
128
130
  isActive: boolean;
131
+ /**
132
+ * @hidden
133
+ */
134
+ isHeaderActive: boolean;
129
135
  /**
130
136
  * Sets the dates of the MultiViewCalendar that will be disabled
131
137
  * ([see example]({% slug disabled_dates_multiviewcalendar %})).
@@ -210,6 +216,10 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
210
216
  * ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
211
217
  */
212
218
  valueChange: EventEmitter<any>;
219
+ /**
220
+ * @hidden
221
+ */
222
+ blurEvent: EventEmitter<any>;
213
223
  /**
214
224
  * @hidden
215
225
  */
@@ -266,6 +276,7 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
266
276
  * @hidden
267
277
  */
268
278
  headerTitleTemplateRef: HeaderTitleTemplateDirective;
279
+ headerElement: ElementRef<HTMLElement>;
269
280
  viewList: HorizontalViewListComponent;
270
281
  cellUID: string;
271
282
  isHovered: boolean;
@@ -293,14 +304,13 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
293
304
  readonly bottomViewEnum: CalendarViewEnum;
294
305
  readonly topViewEnum: CalendarViewEnum;
295
306
  readonly widgetId: string;
296
- readonly widgetRole: string;
297
307
  readonly calendarTabIndex: number;
298
308
  readonly ariaDisabled: boolean;
299
309
  readonly ariaActivedescendant: string;
300
310
  /**
301
311
  * @hidden
302
312
  */
303
- handleBlur(): void;
313
+ handleFocusout(event: any): void;
304
314
  /**
305
315
  * @hidden
306
316
  */
@@ -325,7 +335,7 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
325
335
  * @hidden
326
336
  */
327
337
  keydown(event: KeyDown): void;
328
- constructor(bus: BusViewService, element: ElementRef, navigator: NavigationService, renderer: Renderer2, cdr: ChangeDetectorRef, zone: NgZone, disabledDatesService: DisabledDatesService, selectionService: SelectionService);
338
+ constructor(bus: BusViewService, element: ElementRef, navigator: NavigationService, renderer: Renderer2, cdr: ChangeDetectorRef, zone: NgZone, disabledDatesService: DisabledDatesService, selectionService: SelectionService, pickerService?: PickerService);
329
339
  ngOnInit(): void;
330
340
  ngOnChanges(changes: any): void;
331
341
  ngOnDestroy(): void;
@@ -350,6 +360,10 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
350
360
  * Blurs the Calendar component.
351
361
  */
352
362
  blur(): void;
363
+ /**
364
+ * @hidden
365
+ */
366
+ handleHeaderFocus(): void;
353
367
  /**
354
368
  * @hidden
355
369
  */
@@ -3,13 +3,13 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
- /* tslint:disable:no-forward-ref */
7
- import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone } from '@angular/core';
6
+ import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone, Optional } from '@angular/core';
8
7
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
9
8
  import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
10
9
  import { cloneDate, isEqual } from '@progress/kendo-date-math';
11
10
  import { hasObservers, guid, Keys } from '@progress/kendo-angular-common';
12
11
  import { HorizontalViewListComponent } from './horizontal-view-list.component';
12
+ import { HeaderComponent } from './header.component';
13
13
  import { BusViewService } from './services/bus-view.service';
14
14
  import { NavigationService } from './services/navigation.service';
15
15
  import { SelectionService } from './services/selection.service';
@@ -30,6 +30,7 @@ import { MIN_DATE, MAX_DATE } from '../defaults';
30
30
  import { areDatesEqual, dateInRange, getToday, hasExistingValue, last, noop } from '../util';
31
31
  import { Subscription } from 'rxjs';
32
32
  import { isPresent } from '../common/utils';
33
+ import { PickerService } from '../common/picker.service';
33
34
  const BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
34
35
  const TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
35
36
  const MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
@@ -66,7 +67,7 @@ export const RANGE_CALENDAR_RANGE_VALIDATORS = {
66
67
  * ```
67
68
  */
68
69
  let MultiViewCalendarComponent = class MultiViewCalendarComponent {
69
- constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService) {
70
+ constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService, pickerService) {
70
71
  this.bus = bus;
71
72
  this.element = element;
72
73
  this.navigator = navigator;
@@ -75,6 +76,7 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
75
76
  this.zone = zone;
76
77
  this.disabledDatesService = disabledDatesService;
77
78
  this.selectionService = selectionService;
79
+ this.pickerService = pickerService;
78
80
  /**
79
81
  * @hidden
80
82
  */
@@ -114,6 +116,10 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
114
116
  * @hidden
115
117
  */
116
118
  this.isActive = false;
119
+ /**
120
+ * @hidden
121
+ */
122
+ this.isHeaderActive = false;
117
123
  /**
118
124
  * Defines the active view that the Calendar initially renders
119
125
  * ([see example]({% slug activeview_multiviewcalendar %})).
@@ -178,6 +184,10 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
178
184
  * ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
179
185
  */
180
186
  this.valueChange = new EventEmitter();
187
+ /**
188
+ * @hidden
189
+ */
190
+ this.blurEvent = new EventEmitter();
181
191
  this.cellUID = guid();
182
192
  this.isHovered = false;
183
193
  this.isPrevDisabled = true;
@@ -341,9 +351,6 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
341
351
  get widgetId() {
342
352
  return this.id;
343
353
  }
344
- get widgetRole() {
345
- return 'grid';
346
- }
347
354
  get calendarTabIndex() {
348
355
  return this.disabled ? undefined : this.tabIndex;
349
356
  }
@@ -356,16 +363,22 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
356
363
  /**
357
364
  * @hidden
358
365
  */
359
- handleBlur() {
360
- this.onControlTouched();
366
+ handleFocusout(event) {
367
+ const relatedTarget = event.relatedTarget;
368
+ if (!this.element.nativeElement.contains(relatedTarget)) {
369
+ this.blurEvent.emit(event);
370
+ this.onControlTouched();
371
+ }
361
372
  this.isActive = false;
362
373
  this.isHovered = false; //ensure that hovered is also not active
374
+ this.isHeaderActive = this.headerElement.nativeElement.contains(relatedTarget);
363
375
  }
364
376
  /**
365
377
  * @hidden
366
378
  */
367
379
  handleFocus() {
368
380
  this.isActive = true;
381
+ this.isHeaderActive = false;
369
382
  }
370
383
  /**
371
384
  * @hidden
@@ -398,7 +411,13 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
398
411
  * @hidden
399
412
  */
400
413
  keydown(event) {
414
+ if (this.isHeaderActive) {
415
+ return;
416
+ }
401
417
  if (event.keyCode === Keys.Enter) {
418
+ if (isPresent(this.pickerService)) {
419
+ event.preventDefault(); // Don't submit form from Datepicker popup
420
+ }
402
421
  this.performSelection(this.focusedDate, event);
403
422
  }
404
423
  const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
@@ -473,6 +492,12 @@ let MultiViewCalendarComponent = class MultiViewCalendarComponent {
473
492
  }
474
493
  this.element.nativeElement.blur();
475
494
  }
495
+ /**
496
+ * @hidden
497
+ */
498
+ handleHeaderFocus() {
499
+ this.isHeaderActive = true;
500
+ }
476
501
  /**
477
502
  * @hidden
478
503
  */
@@ -792,6 +817,10 @@ tslib_1.__decorate([
792
817
  Output(),
793
818
  tslib_1.__metadata("design:type", EventEmitter)
794
819
  ], MultiViewCalendarComponent.prototype, "valueChange", void 0);
820
+ tslib_1.__decorate([
821
+ Output('blur'),
822
+ tslib_1.__metadata("design:type", EventEmitter)
823
+ ], MultiViewCalendarComponent.prototype, "blurEvent", void 0);
795
824
  tslib_1.__decorate([
796
825
  ContentChild(CellTemplateDirective, { static: true }),
797
826
  tslib_1.__metadata("design:type", CellTemplateDirective)
@@ -855,6 +884,10 @@ tslib_1.__decorate([
855
884
  tslib_1.__metadata("design:type", HeaderTitleTemplateDirective),
856
885
  tslib_1.__metadata("design:paramtypes", [HeaderTitleTemplateDirective])
857
886
  ], MultiViewCalendarComponent.prototype, "headerTitleTemplateRef", null);
887
+ tslib_1.__decorate([
888
+ ViewChild(HeaderComponent, { static: false, read: ElementRef }),
889
+ tslib_1.__metadata("design:type", ElementRef)
890
+ ], MultiViewCalendarComponent.prototype, "headerElement", void 0);
858
891
  tslib_1.__decorate([
859
892
  ViewChild(HorizontalViewListComponent, { static: false }),
860
893
  tslib_1.__metadata("design:type", HorizontalViewListComponent)
@@ -864,11 +897,6 @@ tslib_1.__decorate([
864
897
  tslib_1.__metadata("design:type", String),
865
898
  tslib_1.__metadata("design:paramtypes", [])
866
899
  ], MultiViewCalendarComponent.prototype, "widgetId", null);
867
- tslib_1.__decorate([
868
- HostBinding('attr.role'),
869
- tslib_1.__metadata("design:type", String),
870
- tslib_1.__metadata("design:paramtypes", [])
871
- ], MultiViewCalendarComponent.prototype, "widgetRole", null);
872
900
  tslib_1.__decorate([
873
901
  HostBinding('attr.tabindex'),
874
902
  tslib_1.__metadata("design:type", Number),
@@ -886,11 +914,11 @@ tslib_1.__decorate([
886
914
  tslib_1.__metadata("design:paramtypes", [])
887
915
  ], MultiViewCalendarComponent.prototype, "ariaActivedescendant", null);
888
916
  tslib_1.__decorate([
889
- HostListener("blur"),
917
+ HostListener('focusout', ['$event']),
890
918
  tslib_1.__metadata("design:type", Function),
891
- tslib_1.__metadata("design:paramtypes", []),
919
+ tslib_1.__metadata("design:paramtypes", [Object]),
892
920
  tslib_1.__metadata("design:returntype", void 0)
893
- ], MultiViewCalendarComponent.prototype, "handleBlur", null);
921
+ ], MultiViewCalendarComponent.prototype, "handleFocusout", null);
894
922
  tslib_1.__decorate([
895
923
  HostListener("focus"),
896
924
  tslib_1.__metadata("design:type", Function),
@@ -970,11 +998,15 @@ MultiViewCalendarComponent = tslib_1.__decorate([
970
998
  (todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
971
999
  (prevButtonClick)="navigateView(prevView)"
972
1000
  (nextButtonClick)="navigateView(nextView)"
1001
+ [kendoEventsOutsideAngular]="{
1002
+ focusin: handleHeaderFocus
1003
+ }"
1004
+ [scope]="this"
973
1005
  >
974
1006
  </kendo-calendar-header>
975
1007
  <kendo-calendar-horizontal
976
1008
  [activeView]="activeViewEnum"
977
- [isActive]="isActive || isHovered"
1009
+ [isActive]="isActive || (isHovered && !isHeaderActive)"
978
1010
  [cellTemplateRef]="activeCellTemplate()?.templateRef"
979
1011
  [weekNumberTemplateRef]="weekNumberTemplate?.templateRef"
980
1012
  [cellUID]="cellUID"
@@ -998,6 +1030,7 @@ MultiViewCalendarComponent = tslib_1.__decorate([
998
1030
  </kendo-calendar-horizontal>
999
1031
  `
1000
1032
  }),
1033
+ tslib_1.__param(8, Optional()),
1001
1034
  tslib_1.__metadata("design:paramtypes", [BusViewService,
1002
1035
  ElementRef,
1003
1036
  NavigationService,
@@ -1005,6 +1038,7 @@ MultiViewCalendarComponent = tslib_1.__decorate([
1005
1038
  ChangeDetectorRef,
1006
1039
  NgZone,
1007
1040
  DisabledDatesService,
1008
- SelectionService])
1041
+ SelectionService,
1042
+ PickerService])
1009
1043
  ], MultiViewCalendarComponent);
1010
1044
  export { MultiViewCalendarComponent };
@@ -7,6 +7,7 @@ import { NgModule } from '@angular/core';
7
7
  import { CommonModule } from '@angular/common';
8
8
  import { IntlModule } from '@progress/kendo-angular-intl';
9
9
  import { PopupModule } from '@progress/kendo-angular-popup';
10
+ import { EventsModule } from '@progress/kendo-angular-common';
10
11
  import { CalendarCommonModule } from './calendar-common.module';
11
12
  import { TemplatesModule } from './templates.module';
12
13
  import { HorizontalViewListComponent } from './horizontal-view-list.component';
@@ -72,7 +73,14 @@ MultiViewCalendarModule = tslib_1.__decorate([
72
73
  CalendarCommonModule,
73
74
  TemplatesModule
74
75
  ],
75
- imports: [CommonModule, CalendarCommonModule, IntlModule, TemplatesModule, PopupModule],
76
+ imports: [
77
+ CommonModule,
78
+ CalendarCommonModule,
79
+ IntlModule,
80
+ TemplatesModule,
81
+ PopupModule,
82
+ EventsModule
83
+ ],
76
84
  providers: [
77
85
  NavigationService,
78
86
  CenturyViewService,
@@ -297,7 +297,11 @@ ViewListComponent = tslib_1.__decorate([
297
297
  (scrollChange)="scrollChange($event)"
298
298
  (activeIndexChange)="setActiveDate($event)"
299
299
  >
300
- <table class="k-calendar-table" #list>
300
+ <table
301
+ #list
302
+ role="grid"
303
+ class="k-calendar-table"
304
+ >
301
305
  <colgroup><col *ngFor="let _ of cols" /></colgroup>
302
306
 
303
307
  <tbody class="k-calendar-tbody"
@@ -154,11 +154,13 @@ export declare class DateInputComponent implements OnInit, ControlValueAccessor,
154
154
  /**
155
155
  * Specifies the biggest date that is valid
156
156
  * ([see example]({% slug dateranges_dateinput %})).
157
+ * By default, the `max` value is `2099-12-31`.
157
158
  */
158
159
  max: Date;
159
160
  /**
160
161
  * Specifies the smallest date that is valid
161
162
  * ([see example]({% slug dateranges_dateinput %})).
163
+ * By default, the `min` value is `1900-1-1`.
162
164
  */
163
165
  min: Date;
164
166
  /**
@@ -181,11 +181,13 @@ export declare class DatePickerComponent implements ControlValueAccessor, OnInit
181
181
  /**
182
182
  * Specifies the smallest valid date
183
183
  * ([see example]({% slug dateranges_datepicker %})).
184
+ * By default, the `min` value is `1900-1-1`.
184
185
  */
185
186
  min: Date;
186
187
  /**
187
188
  * Specifies the biggest valid date
188
189
  * ([see example]({% slug dateranges_datepicker %})).
190
+ * By default, the `max` value is `2099-12-31`.
189
191
  */
190
192
  max: Date;
191
193
  /**
@@ -28,7 +28,7 @@ import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title
28
28
  import { NavigationItemTemplateDirective } from '../calendar/templates/navigation-item-template.directive';
29
29
  import { PickerService } from '../common/picker.service';
30
30
  import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
31
- import { noop, isValidRange, setTime, isWindowAvailable } from '../util';
31
+ import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar } from '../util';
32
32
  import { TOUCH_ENABLED } from '../touch-enabled';
33
33
  import { requiresZoneOnBlur, currentFocusTarget } from '../common/utils';
34
34
  import { fromEvent } from 'rxjs';
@@ -121,11 +121,13 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
121
121
  /**
122
122
  * Specifies the smallest valid date
123
123
  * ([see example]({% slug dateranges_datepicker %})).
124
+ * By default, the `min` value is `1900-1-1`.
124
125
  */
125
126
  this.min = cloneDate(MIN_DATE);
126
127
  /**
127
128
  * Specifies the biggest valid date
128
129
  * ([see example]({% slug dateranges_datepicker %})).
130
+ * By default, the `max` value is `2099-12-31`.
129
131
  */
130
132
  this.max = cloneDate(MAX_DATE);
131
133
  /**
@@ -629,7 +631,7 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
629
631
  * @hidden
630
632
  */
631
633
  handleKeydown(e) {
632
- const { altKey, keyCode } = e;
634
+ const { altKey, shiftKey, keyCode, target } = e;
633
635
  if (keyCode === Keys.Escape) {
634
636
  this.show = false;
635
637
  }
@@ -641,7 +643,10 @@ let DatePickerComponent = DatePickerComponent_1 = class DatePickerComponent {
641
643
  this.show = false;
642
644
  }
643
645
  }
644
- if (keyCode === Keys.Tab && this.show && this.calendar.isActive) {
646
+ if (keyCode === Keys.Enter && target.classList.contains('k-calendar')) {
647
+ e.preventDefault(); // Don't submit form on date selection in popup
648
+ }
649
+ if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
645
650
  this.input.focus();
646
651
  this.show = false;
647
652
  }