@progress/kendo-angular-dateinputs 7.1.3-dev.202210121001 → 7.1.3-dev.202210260703

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 (56) hide show
  1. package/bundles/kendo-angular-dateinputs.umd.js +1 -1
  2. package/calendar/calendar.component.d.ts +7 -2
  3. package/calendar/header.component.d.ts +4 -1
  4. package/calendar/horizontal-view-list.component.d.ts +17 -1
  5. package/calendar/localization/calendar-messages.d.ts +5 -1
  6. package/calendar/localization/multiview-calendar-messages.d.ts +5 -1
  7. package/calendar/multiview-calendar.component.d.ts +21 -11
  8. package/calendar/services/bus-view.service.d.ts +1 -0
  9. package/calendar/services/selection.service.d.ts +2 -0
  10. package/calendar/services/weeknames.service.d.ts +1 -1
  11. package/calendar/view-list.component.d.ts +9 -1
  12. package/calendar/view.component.d.ts +3 -1
  13. package/common/utils.d.ts +33 -0
  14. package/dateinput/dateinput.component.d.ts +22 -8
  15. package/datepicker/datepicker.component.d.ts +2 -10
  16. package/daterange/date-range-end-input.directive.d.ts +1 -0
  17. package/daterange/date-range-input.d.ts +4 -1
  18. package/daterange/date-range-start-input.directive.d.ts +2 -0
  19. package/daterange/date-range.component.d.ts +7 -1
  20. package/daterange/date-range.service.d.ts +6 -2
  21. package/datetimepicker/datetimepicker.component.d.ts +6 -9
  22. package/esm2015/calendar/calendar.component.js +88 -48
  23. package/esm2015/calendar/header.component.js +30 -3
  24. package/esm2015/calendar/horizontal-view-list.component.js +83 -11
  25. package/esm2015/calendar/localization/calendar-messages.js +3 -1
  26. package/esm2015/calendar/localization/multiview-calendar-messages.js +3 -1
  27. package/esm2015/calendar/multiview-calendar.component.js +91 -45
  28. package/esm2015/calendar/services/bus-view.service.js +2 -0
  29. package/esm2015/calendar/services/month-view.service.js +1 -1
  30. package/esm2015/calendar/services/selection.service.js +4 -0
  31. package/esm2015/calendar/services/weeknames.service.js +2 -2
  32. package/esm2015/calendar/view-list.component.js +45 -9
  33. package/esm2015/calendar/view.component.js +16 -3
  34. package/esm2015/common/utils.js +34 -0
  35. package/esm2015/dateinput/dateinput.component.js +68 -34
  36. package/esm2015/datepicker/datepicker.component.js +27 -20
  37. package/esm2015/daterange/date-range-end-input.directive.js +6 -1
  38. package/esm2015/daterange/date-range-input.js +10 -0
  39. package/esm2015/daterange/date-range-popup.component.js +4 -4
  40. package/esm2015/daterange/date-range-selection.directive.js +1 -1
  41. package/esm2015/daterange/date-range-start-input.directive.js +9 -0
  42. package/esm2015/daterange/date-range.component.js +29 -11
  43. package/esm2015/daterange/date-range.service.js +28 -4
  44. package/esm2015/datetimepicker/datetimepicker.component.js +38 -20
  45. package/esm2015/package-metadata.js +1 -1
  46. package/esm2015/timepicker/localization/messages.js +11 -1
  47. package/esm2015/timepicker/timelist.component.js +57 -10
  48. package/esm2015/timepicker/timepicker.component.js +75 -32
  49. package/esm2015/util.js +2 -2
  50. package/esm2015/virtualization/virtualization.component.js +7 -5
  51. package/fesm2015/kendo-angular-dateinputs.js +811 -320
  52. package/package.json +1 -1
  53. package/timepicker/localization/messages.d.ts +21 -1
  54. package/timepicker/timelist.component.d.ts +10 -1
  55. package/timepicker/timepicker.component.d.ts +7 -13
  56. package/virtualization/virtualization.component.d.ts +3 -1
@@ -3,14 +3,14 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  /* eslint-disable @angular-eslint/component-selector */
6
- import { Component, ChangeDetectionStrategy, EventEmitter, HostBinding, Input, Output } from '@angular/core';
6
+ import { Component, ChangeDetectionStrategy, EventEmitter, HostBinding, Input, Output, HostListener } from '@angular/core';
7
7
  import { cloneDate } from '@progress/kendo-date-math';
8
8
  import { Action } from './models/navigation-action.enum';
9
9
  import { CalendarViewEnum } from './models/view.enum';
10
10
  import { MIN_DATE, MAX_DATE } from '../defaults';
11
11
  import { dateInRange, hasChange } from '../util';
12
12
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
13
- import { isPresent } from '../common/utils';
13
+ import { attributeNames, isPresent } from '../common/utils';
14
14
  import * as i0 from "@angular/core";
15
15
  import * as i1 from "./services/bus-view.service";
16
16
  import * as i2 from "@progress/kendo-angular-intl";
@@ -39,16 +39,28 @@ export class HorizontalViewListComponent {
39
39
  this.showViewHeader = false;
40
40
  this.animateNavigation = false;
41
41
  this.orientation = 'horizontal';
42
+ this.tabIndex = 0;
43
+ this.disabled = false;
42
44
  this.cellClick = new EventEmitter();
43
45
  this.weekNumberCellClick = new EventEmitter();
44
46
  this.cellEnter = new EventEmitter();
45
47
  this.cellLeave = new EventEmitter();
46
48
  this.activeDateChange = new EventEmitter();
49
+ this.focusCalendar = new EventEmitter();
50
+ this.blurCalendar = new EventEmitter();
51
+ this.focusedCellChange = new EventEmitter();
47
52
  this.getComponentClass = true;
48
53
  this.weekNames = [];
54
+ this.wideWeekNames = [];
49
55
  this.dates = [];
50
56
  this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
51
57
  }
58
+ /**
59
+ * @hidden
60
+ */
61
+ handleFocus() {
62
+ this.focusCalendar.emit();
63
+ }
52
64
  get weekNumber() {
53
65
  return this.showWeekNumbers && this.isMonthView();
54
66
  }
@@ -73,10 +85,17 @@ export class HorizontalViewListComponent {
73
85
  get getComponentCenturyClass() {
74
86
  return this.activeView === CalendarViewEnum.century;
75
87
  }
88
+ get getActiveDescendant() {
89
+ return this.views === 1 ? this.activeDescendant : null;
90
+ }
91
+ get getTabIndex() {
92
+ return this.disabled || this.views === 2 ? null : this.tabIndex;
93
+ }
76
94
  ngOnChanges(changes) {
77
95
  this.initService();
78
96
  if (this.weekNames.length === 0 || changes.weekNumber) {
79
- this.weekNames = this.weekService.getWeekNames(this.weekNumber);
97
+ this.weekNames = this.getWeekNames('short');
98
+ this.wideWeekNames = this.getWeekNames('wide');
80
99
  }
81
100
  if (!this.service) {
82
101
  return;
@@ -93,6 +112,11 @@ export class HorizontalViewListComponent {
93
112
  this.activeDate = cloneDate(this.dates[0]);
94
113
  this.activeDateChange.emit(this.activeDate);
95
114
  }
115
+ this.setAriaActivedescendant();
116
+ //set tabindex for MultiViewCalendar
117
+ if (this.views === 2) {
118
+ this.renderer.setAttribute(this.element.nativeElement, 'tabindex', this.tabIndex.toString());
119
+ }
96
120
  }
97
121
  ngAfterViewInit() {
98
122
  // make the calendar look the same in the different browsers
@@ -197,6 +221,9 @@ export class HorizontalViewListComponent {
197
221
  }
198
222
  return this.isListInRange(this.service.datesList(this.move(action), this.getTake(this.skip)));
199
223
  }
224
+ getWeekNames(type) {
225
+ return this.weekService.getWeekNames(this.weekNumber, type);
226
+ }
200
227
  setTableMinWidth() {
201
228
  const container = this.element.nativeElement;
202
229
  const table = container.querySelector('table');
@@ -206,7 +233,8 @@ export class HorizontalViewListComponent {
206
233
  }
207
234
  }
208
235
  intlChange() {
209
- this.weekNames = this.weekService.getWeekNames(this.weekNumber);
236
+ this.weekNames = this.getWeekNames('short');
237
+ this.wideWeekNames = this.getWeekNames('wide');
210
238
  this.cdr.markForCheck();
211
239
  }
212
240
  clampDate(value) {
@@ -226,19 +254,34 @@ export class HorizontalViewListComponent {
226
254
  getTake(skip) {
227
255
  return Math.min(this.total - skip, this.views);
228
256
  }
257
+ setAriaActivedescendant() {
258
+ if (this.views === 2) {
259
+ this.renderer.setAttribute(this.element.nativeElement, attributeNames.ariaActiveDescendant, this.activeDescendant);
260
+ }
261
+ }
229
262
  }
230
263
  HorizontalViewListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HorizontalViewListComponent, deps: [{ token: i1.BusViewService }, { token: i2.IntlService }, { token: i3.WeekNamesService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
231
- HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", activeRangeEnd: "activeRangeEnd", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectionRange: "selectionRange", selectedDates: "selectedDates", views: "views", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", orientation: "orientation", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", activeDateChange: "activeDateChange" }, host: { properties: { "class.k-calendar-view": "this.getComponentClass", "class.k-align-items-start": "this.getComponentClass", "class.k-justify-content-center": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass" } }, usesOnChanges: true, ngImport: i0, template: `
264
+ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", activeRangeEnd: "activeRangeEnd", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectionRange: "selectionRange", selectedDates: "selectedDates", views: "views", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", orientation: "orientation", activeDescendant: "activeDescendant", tabIndex: "tabIndex", disabled: "disabled", id: "id", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", activeDateChange: "activeDateChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { listeners: { "focus": "handleFocus()" }, properties: { "class.k-calendar-view": "this.getComponentClass", "class.k-align-items-start": "this.getComponentClass", "class.k-justify-content-center": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass" } }, usesOnChanges: true, ngImport: i0, template: `
232
265
  <ng-template #tableTemplate let-date="date" let-class="className">
233
266
  <table
234
267
  role="grid"
235
268
  class="k-content k-calendar-table"
236
269
  [ngClass]="class"
270
+ [attr.aria-labelledby]="id"
271
+ [attr.aria-activedescendant]="getActiveDescendant"
272
+ [attr.tabindex]="getTabIndex"
273
+ (focus)="focusCalendar.emit()"
274
+ (focusout)="blurCalendar.emit($event)"
237
275
  >
238
276
  <caption *ngIf="showViewHeader" [ngClass]="getCaptionClass()">{{ getCaptionTitle(date) }}</caption>
239
- <thead *ngIf="isMonthView()" class="k-calendar-thead">
277
+ <thead *ngIf="isMonthView()" class="k-calendar-thead" role="rowgroup">
240
278
  <tr class="k-calendar-tr" role="row">
241
- <th *ngFor="let name of weekNames" class="k-calendar-th">{{name}}</th>
279
+ <th *ngFor="let name of weekNames; let i = index;"
280
+ class="k-calendar-th"
281
+ scope="col"
282
+ [attr.aria-label]="wideWeekNames[i]"
283
+ role="columnheader"
284
+ >{{name}}</th>
242
285
  </tr>
243
286
  </thead>
244
287
  <tbody
@@ -263,6 +306,7 @@ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
263
306
  (weekNumberCellClick)="weekNumberCellClick.emit($event)"
264
307
  (cellEnter)="cellEnter.emit($event)"
265
308
  (cellLeave)="cellLeave.emit($event)"
309
+ (focusedCellId)="focusedCellChange.emit($event)"
266
310
  >
267
311
  </tbody>
268
312
  </table>
@@ -298,7 +342,7 @@ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
298
342
  }"
299
343
  >
300
344
  </ng-template>
301
- `, isInline: true, components: [{ type: i4.ViewComponent, selector: "[kendoCalendarView]", inputs: ["direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave"] }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
345
+ `, isInline: true, components: [{ type: i4.ViewComponent, selector: "[kendoCalendarView]", inputs: ["direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "focusedCellId"] }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
302
346
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HorizontalViewListComponent, decorators: [{
303
347
  type: Component,
304
348
  args: [{
@@ -310,11 +354,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
310
354
  role="grid"
311
355
  class="k-content k-calendar-table"
312
356
  [ngClass]="class"
357
+ [attr.aria-labelledby]="id"
358
+ [attr.aria-activedescendant]="getActiveDescendant"
359
+ [attr.tabindex]="getTabIndex"
360
+ (focus)="focusCalendar.emit()"
361
+ (focusout)="blurCalendar.emit($event)"
313
362
  >
314
363
  <caption *ngIf="showViewHeader" [ngClass]="getCaptionClass()">{{ getCaptionTitle(date) }}</caption>
315
- <thead *ngIf="isMonthView()" class="k-calendar-thead">
364
+ <thead *ngIf="isMonthView()" class="k-calendar-thead" role="rowgroup">
316
365
  <tr class="k-calendar-tr" role="row">
317
- <th *ngFor="let name of weekNames" class="k-calendar-th">{{name}}</th>
366
+ <th *ngFor="let name of weekNames; let i = index;"
367
+ class="k-calendar-th"
368
+ scope="col"
369
+ [attr.aria-label]="wideWeekNames[i]"
370
+ role="columnheader"
371
+ >{{name}}</th>
318
372
  </tr>
319
373
  </thead>
320
374
  <tbody
@@ -339,6 +393,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
339
393
  (weekNumberCellClick)="weekNumberCellClick.emit($event)"
340
394
  (cellEnter)="cellEnter.emit($event)"
341
395
  (cellLeave)="cellLeave.emit($event)"
396
+ (focusedCellId)="focusedCellChange.emit($event)"
342
397
  >
343
398
  </tbody>
344
399
  </table>
@@ -376,7 +431,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
376
431
  </ng-template>
377
432
  `
378
433
  }]
379
- }], ctorParameters: function () { return [{ type: i1.BusViewService }, { type: i2.IntlService }, { type: i3.WeekNamesService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { cellTemplateRef: [{
434
+ }], ctorParameters: function () { return [{ type: i1.BusViewService }, { type: i2.IntlService }, { type: i3.WeekNamesService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { handleFocus: [{
435
+ type: HostListener,
436
+ args: ["focus"]
437
+ }], cellTemplateRef: [{
380
438
  type: Input
381
439
  }], weekNumberTemplateRef: [{
382
440
  type: Input
@@ -406,6 +464,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
406
464
  type: Input
407
465
  }], orientation: [{
408
466
  type: Input
467
+ }], activeDescendant: [{
468
+ type: Input
469
+ }], tabIndex: [{
470
+ type: Input
471
+ }], disabled: [{
472
+ type: Input
473
+ }], id: [{
474
+ type: Input
409
475
  }], weekNumber: [{
410
476
  type: Input
411
477
  }], cellClick: [{
@@ -418,6 +484,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
418
484
  type: Output
419
485
  }], activeDateChange: [{
420
486
  type: Output
487
+ }], focusCalendar: [{
488
+ type: Output
489
+ }], blurCalendar: [{
490
+ type: Output
491
+ }], focusedCellChange: [{
492
+ type: Output
421
493
  }], getComponentClass: [{
422
494
  type: HostBinding,
423
495
  args: ["class.k-calendar-view"]
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
11
11
  export class CalendarMessages extends ComponentMessages {
12
12
  }
13
13
  CalendarMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
14
- CalendarMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CalendarMessages, selector: "kendo-calendar-messages-base", inputs: { today: "today", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle" }, usesInheritance: true, ngImport: i0 });
14
+ CalendarMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CalendarMessages, selector: "kendo-calendar-messages-base", inputs: { today: "today", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle", parentViewButtonTitle: "parentViewButtonTitle" }, usesInheritance: true, ngImport: i0 });
15
15
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarMessages, decorators: [{
16
16
  type: Directive,
17
17
  args: [{
@@ -24,4 +24,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
24
24
  type: Input
25
25
  }], nextButtonTitle: [{
26
26
  type: Input
27
+ }], parentViewButtonTitle: [{
28
+ type: Input
27
29
  }] } });
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
11
11
  export class Messages extends ComponentMessages {
12
12
  }
13
13
  Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
14
- Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Messages, selector: "kendo-multiview-calendar-messages-base", inputs: { today: "today", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle" }, usesInheritance: true, ngImport: i0 });
14
+ Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Messages, selector: "kendo-multiview-calendar-messages-base", inputs: { today: "today", prevButtonTitle: "prevButtonTitle", nextButtonTitle: "nextButtonTitle", parentViewButtonTitle: "parentViewButtonTitle" }, usesInheritance: true, ngImport: i0 });
15
15
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, decorators: [{
16
16
  type: Directive,
17
17
  args: [{
@@ -24,4 +24,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
24
24
  type: Input
25
25
  }], nextButtonTitle: [{
26
26
  type: Input
27
+ }], parentViewButtonTitle: [{
28
+ type: Input
27
29
  }] } });
@@ -10,7 +10,6 @@ import { hasObservers, guid, Keys } from '@progress/kendo-angular-common';
10
10
  import { HorizontalViewListComponent } from './horizontal-view-list.component';
11
11
  import { HeaderComponent } from './header.component';
12
12
  import { BusViewService } from './services/bus-view.service';
13
- import { NavigationService } from './services/navigation.service';
14
13
  import { SelectionService } from './services/selection.service';
15
14
  import { DisabledDatesService } from './services/disabled-dates.service';
16
15
  import { CellTemplateDirective } from './templates/cell-template.directive';
@@ -28,7 +27,8 @@ import { disabledDatesRangeValidator } from '../validators/disabled-dates-range.
28
27
  import { MIN_DATE, MAX_DATE } from '../defaults';
29
28
  import { areDatesEqual, dateInRange, getToday, hasExistingValue, last, noop } from '../util';
30
29
  import { Subscription } from 'rxjs';
31
- import { isPresent } from '../common/utils';
30
+ import { isArrowWithShiftPressed, isPresent } from '../common/utils';
31
+ import { NavigationService } from './services/navigation.service';
32
32
  import * as i0 from "@angular/core";
33
33
  import * as i1 from "./services/bus-view.service";
34
34
  import * as i2 from "./services/navigation.service";
@@ -37,7 +37,6 @@ import * as i4 from "./services/selection.service";
37
37
  import * as i5 from "./header.component";
38
38
  import * as i6 from "./horizontal-view-list.component";
39
39
  import * as i7 from "./localization/multiview-calendar-localized-messages.directive";
40
- import * as i8 from "@progress/kendo-angular-common";
41
40
  const BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
42
41
  const TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
43
42
  const MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
@@ -83,10 +82,6 @@ export class MultiViewCalendarComponent {
83
82
  this.zone = zone;
84
83
  this.disabledDatesService = disabledDatesService;
85
84
  this.selectionService = selectionService;
86
- /**
87
- * @hidden
88
- */
89
- this.id = guid();
90
85
  /**
91
86
  * Determines whether the built-in min or max validators are enforced when validating a form.
92
87
  */
@@ -122,10 +117,6 @@ export class MultiViewCalendarComponent {
122
117
  * @hidden
123
118
  */
124
119
  this.isActive = false;
125
- /**
126
- * @hidden
127
- */
128
- this.isHeaderActive = false;
129
120
  /**
130
121
  * Defines the active view that the Calendar initially renders
131
122
  * ([see example]({% slug activeview_multiviewcalendar %})).
@@ -202,6 +193,10 @@ export class MultiViewCalendarComponent {
202
193
  * @hidden
203
194
  */
204
195
  this.blurEvent = new EventEmitter();
196
+ /**
197
+ * @hidden
198
+ */
199
+ this.focusCalendar = new EventEmitter();
205
200
  this.cellUID = guid();
206
201
  this.isHovered = false;
207
202
  this.isPrevDisabled = true;
@@ -221,6 +216,7 @@ export class MultiViewCalendarComponent {
221
216
  this.disabledDatesRangeValidateFn = noop;
222
217
  this.subscriptions = new Subscription();
223
218
  this.setClasses(element.nativeElement);
219
+ this.id = `kendo-multiviewcalendarid-${this.bus.calendarId}-`;
224
220
  }
225
221
  /**
226
222
  * Sets or gets the `focusedDate` property of the Calendar and
@@ -235,6 +231,24 @@ export class MultiViewCalendarComponent {
235
231
  get focusedDate() {
236
232
  return this._focusedDate;
237
233
  }
234
+ /**
235
+ * @hidden
236
+ */
237
+ get headerId() {
238
+ return this.id + 'header-';
239
+ }
240
+ /**
241
+ * @hidden
242
+ */
243
+ get multiViewCalendarHeaderIdLabel() {
244
+ return this.views === 2 ? this.id + 'header-' : null;
245
+ }
246
+ /**
247
+ * @hidden
248
+ */
249
+ get calendarHeaderIdLabel() {
250
+ return this.views === 1 ? this.id + 'header-' : null;
251
+ }
238
252
  /**
239
253
  * Sets or gets the `min` property of the Calendar and
240
254
  * defines the minimum allowed date value.
@@ -405,14 +419,14 @@ export class MultiViewCalendarComponent {
405
419
  return CalendarViewEnum[this.topView];
406
420
  }
407
421
  get widgetId() {
408
- return this.id;
409
- }
410
- get calendarTabIndex() {
411
- return this.disabled ? undefined : this.tabIndex;
422
+ return this.views === 2 ? this.id : null;
412
423
  }
413
424
  get ariaDisabled() {
414
425
  return this.disabled;
415
426
  }
427
+ /**
428
+ * @hidden
429
+ */
416
430
  get ariaActivedescendant() {
417
431
  return this.cellUID + this.focusedDate.getTime();
418
432
  }
@@ -427,14 +441,13 @@ export class MultiViewCalendarComponent {
427
441
  }
428
442
  this.isActive = false;
429
443
  this.isHovered = false; //ensure that hovered is also not active
430
- this.isHeaderActive = this.headerElement.nativeElement.contains(relatedTarget);
431
444
  }
432
445
  /**
433
446
  * @hidden
434
447
  */
435
448
  handleFocus() {
436
449
  this.isActive = true;
437
- this.isHeaderActive = false;
450
+ this.focusCalendar.emit();
438
451
  }
439
452
  /**
440
453
  * @hidden
@@ -467,10 +480,32 @@ export class MultiViewCalendarComponent {
467
480
  * @hidden
468
481
  */
469
482
  keydown(event) {
470
- if (this.isHeaderActive) {
483
+ const arrowUpOrDownKeyPressed = [Keys.ArrowUp, Keys.ArrowDown].indexOf(event.keyCode) !== -1;
484
+ const ctrlKey = event.ctrlKey || event.metaKey;
485
+ const onArrowRightAndControl = event.keyCode === Keys.ArrowRight && ctrlKey;
486
+ const onArrowLeftAndControl = event.keyCode === Keys.ArrowLeft && ctrlKey;
487
+ const onTKeyPress = event.keyCode === Keys.KeyT;
488
+ const onEnterKeyPress = event.keyCode === Keys.Enter;
489
+ if (onArrowRightAndControl) {
490
+ event.preventDefault();
491
+ this.navigateView(this.nextView);
471
492
  return;
472
493
  }
473
- if (event.keyCode === Keys.Enter) {
494
+ else if (onArrowLeftAndControl) {
495
+ event.preventDefault();
496
+ this.navigateView(this.prevView);
497
+ return;
498
+ }
499
+ else if (ctrlKey && arrowUpOrDownKeyPressed) {
500
+ event.preventDefault();
501
+ }
502
+ else if (onTKeyPress) {
503
+ this.focusedDate = getToday();
504
+ this.bus.moveToBottom(this.activeViewEnum);
505
+ return;
506
+ }
507
+ else if (onEnterKeyPress) {
508
+ this.selectionService.lastClicked = this.focusedDate;
474
509
  this.performSelection(this.focusedDate, event);
475
510
  }
476
511
  const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
@@ -483,6 +518,10 @@ export class MultiViewCalendarComponent {
483
518
  if (!isSameView) {
484
519
  this.emitNavigate(this.focusedDate);
485
520
  }
521
+ if (isArrowWithShiftPressed(event)) {
522
+ event['anyArrow'] = true;
523
+ this.performSelection(this.focusedDate, event);
524
+ }
486
525
  }
487
526
  ngOnInit() {
488
527
  this.subscriptions.add(this.bus.viewChanged.subscribe(({ view }) => {
@@ -534,7 +573,7 @@ export class MultiViewCalendarComponent {
534
573
  if (!this.element) {
535
574
  return;
536
575
  }
537
- this.element.nativeElement.focus();
576
+ this.element.nativeElement.querySelector('.k-calendar-view').focus();
538
577
  }
539
578
  /**
540
579
  * Blurs the Calendar component.
@@ -543,13 +582,9 @@ export class MultiViewCalendarComponent {
543
582
  if (!this.element) {
544
583
  return;
545
584
  }
546
- this.element.nativeElement.blur();
547
- }
548
- /**
549
- * @hidden
550
- */
551
- handleHeaderFocus() {
552
- this.isHeaderActive = true;
585
+ const activeElement = this.views === 2 ? this.element.nativeElement.querySelector('.k-calendar-view') :
586
+ this.element.nativeElement.querySelector('.k-content.k-calendar-table');
587
+ activeElement.blur();
553
588
  }
554
589
  /**
555
590
  * @hidden
@@ -678,6 +713,7 @@ export class MultiViewCalendarComponent {
678
713
  * @hidden
679
714
  */
680
715
  handleCellClick({ date, modifiers }) {
716
+ this.selectionService.lastClicked = date;
681
717
  this.performSelection(date, modifiers);
682
718
  const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
683
719
  if (!isSameView) {
@@ -756,7 +792,7 @@ export class MultiViewCalendarComponent {
756
792
  }
757
793
  }
758
794
  MultiViewCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiViewCalendarComponent, deps: [{ token: i1.BusViewService }, { token: i0.ElementRef }, { token: i2.NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i3.DisabledDatesService }, { token: i4.SelectionService }], target: i0.ɵɵFactoryTarget.Component });
759
- MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", blurEvent: "blur" }, host: { listeners: { "focusout": "handleFocusout($event)", "focus": "handleFocus()", "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.tabindex": "this.calendarTabIndex", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled", "attr.aria-activedescendant": "this.ariaActivedescendant" } }, providers: [
795
+ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", blurEvent: "blur", focusCalendar: "focusCalendar" }, host: { listeners: { "focusout": "handleFocusout($event)", "focus": "handleFocus()", "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
760
796
  BusViewService,
761
797
  RANGE_CALENDAR_VALUE_ACCESSOR,
762
798
  RANGE_CALENDAR_RANGE_VALIDATORS,
@@ -778,6 +814,9 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
778
814
 
779
815
  i18n-nextButtonTitle="kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar"
780
816
  nextButtonTitle="Navigate to next view"
817
+
818
+ i18n-parentViewButtonTitle="kendo.multiviewcalendar.parentViewButtonTitle|The title of the parent view button in the Multiview calendar header"
819
+ parentViewButtonTitle="Navigate to parent view"
781
820
  >
782
821
  </ng-container>
783
822
  <kendo-calendar-header
@@ -785,6 +824,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
785
824
  [currentDate]="activeDate"
786
825
  [min]="min"
787
826
  [max]="max"
827
+ [id]="headerId"
788
828
  [rangeLength]="views"
789
829
  [templateRef]="headerTitleTemplateRef?.templateRef"
790
830
  [isPrevDisabled]="isPrevDisabled"
@@ -794,15 +834,14 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
794
834
  (todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
795
835
  (prevButtonClick)="navigateView(prevView)"
796
836
  (nextButtonClick)="navigateView(nextView)"
797
- [kendoEventsOutsideAngular]="{
798
- focusin: handleHeaderFocus
799
- }"
800
- [scope]="this"
801
837
  >
802
838
  </kendo-calendar-header>
803
839
  <kendo-calendar-horizontal
840
+ [id]="calendarHeaderIdLabel"
841
+ [attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
804
842
  [activeView]="activeViewEnum"
805
- [isActive]="isActive || (isHovered && !isHeaderActive)"
843
+ [activeDescendant]="ariaActivedescendant"
844
+ [isActive]="isActive || isHovered"
806
845
  [cellTemplateRef]="activeCellTemplate()?.templateRef"
807
846
  [weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
808
847
  [cellUID]="cellUID"
@@ -817,14 +856,18 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
817
856
  [selectionRange]="selectionRange"
818
857
  [selectedDates]="selectedDates"
819
858
  [orientation]="orientation"
859
+ [tabIndex]="tabIndex"
860
+ [disabled]="disabled"
820
861
  (cellClick)="handleCellClick($event)"
821
862
  (weekNumberCellClick)="handleWeekNumberClick($event)"
822
863
  (cellEnter)="emitCellEvent(cellEnter, $event)"
823
864
  (cellLeave)="emitCellEvent(cellLeave, $event)"
824
865
  (activeDateChange)="setActiveDate($event)"
866
+ (focusCalendar)="handleFocus()"
867
+ (blurCalendar)="handleFocusout($event)"
825
868
  >
826
869
  </kendo-calendar-horizontal>
827
- `, isInline: true, components: [{ type: i5.HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "templateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { type: i6.HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "activeRangeEnd", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectionRange", "selectedDates", "views", "showViewHeader", "animateNavigation", "orientation", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "activeDateChange"] }], directives: [{ type: i7.MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
870
+ `, isInline: true, components: [{ type: i5.HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "templateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { type: i6.HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "activeRangeEnd", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectionRange", "selectedDates", "views", "showViewHeader", "animateNavigation", "orientation", "activeDescendant", "tabIndex", "disabled", "id", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "activeDateChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }], directives: [{ type: i7.MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
828
871
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: MultiViewCalendarComponent, decorators: [{
829
872
  type: Component,
830
873
  args: [{
@@ -854,6 +897,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
854
897
 
855
898
  i18n-nextButtonTitle="kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar"
856
899
  nextButtonTitle="Navigate to next view"
900
+
901
+ i18n-parentViewButtonTitle="kendo.multiviewcalendar.parentViewButtonTitle|The title of the parent view button in the Multiview calendar header"
902
+ parentViewButtonTitle="Navigate to parent view"
857
903
  >
858
904
  </ng-container>
859
905
  <kendo-calendar-header
@@ -861,6 +907,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
861
907
  [currentDate]="activeDate"
862
908
  [min]="min"
863
909
  [max]="max"
910
+ [id]="headerId"
864
911
  [rangeLength]="views"
865
912
  [templateRef]="headerTitleTemplateRef?.templateRef"
866
913
  [isPrevDisabled]="isPrevDisabled"
@@ -870,15 +917,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
870
917
  (todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
871
918
  (prevButtonClick)="navigateView(prevView)"
872
919
  (nextButtonClick)="navigateView(nextView)"
873
- [kendoEventsOutsideAngular]="{
874
- focusin: handleHeaderFocus
875
- }"
876
- [scope]="this"
877
920
  >
878
921
  </kendo-calendar-header>
879
922
  <kendo-calendar-horizontal
923
+ [id]="calendarHeaderIdLabel"
924
+ [attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
880
925
  [activeView]="activeViewEnum"
881
- [isActive]="isActive || (isHovered && !isHeaderActive)"
926
+ [activeDescendant]="ariaActivedescendant"
927
+ [isActive]="isActive || isHovered"
882
928
  [cellTemplateRef]="activeCellTemplate()?.templateRef"
883
929
  [weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
884
930
  [cellUID]="cellUID"
@@ -893,11 +939,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
893
939
  [selectionRange]="selectionRange"
894
940
  [selectedDates]="selectedDates"
895
941
  [orientation]="orientation"
942
+ [tabIndex]="tabIndex"
943
+ [disabled]="disabled"
896
944
  (cellClick)="handleCellClick($event)"
897
945
  (weekNumberCellClick)="handleWeekNumberClick($event)"
898
946
  (cellEnter)="emitCellEvent(cellEnter, $event)"
899
947
  (cellLeave)="emitCellEvent(cellLeave, $event)"
900
948
  (activeDateChange)="setActiveDate($event)"
949
+ (focusCalendar)="handleFocus()"
950
+ (blurCalendar)="handleFocusout($event)"
901
951
  >
902
952
  </kendo-calendar-horizontal>
903
953
  `
@@ -961,6 +1011,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
961
1011
  }], blurEvent: [{
962
1012
  type: Output,
963
1013
  args: ['blur']
1014
+ }], focusCalendar: [{
1015
+ type: Output
964
1016
  }], cellTemplate: [{
965
1017
  type: ContentChild,
966
1018
  args: [CellTemplateDirective, { static: false }]
@@ -1012,18 +1064,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1012
1064
  }], widgetId: [{
1013
1065
  type: HostBinding,
1014
1066
  args: ['attr.id']
1015
- }], calendarTabIndex: [{
1016
- type: HostBinding,
1017
- args: ['attr.tabindex']
1018
1067
  }], ariaDisabled: [{
1019
1068
  type: HostBinding,
1020
1069
  args: ['attr.aria-disabled']
1021
1070
  }, {
1022
1071
  type: HostBinding,
1023
1072
  args: ['class.k-disabled']
1024
- }], ariaActivedescendant: [{
1025
- type: HostBinding,
1026
- args: ['attr.aria-activedescendant']
1027
1073
  }], handleFocusout: [{
1028
1074
  type: HostListener,
1029
1075
  args: ['focusout', ['$event']]
@@ -19,6 +19,7 @@ const viewOffset = (view, offset) => {
19
19
  const candidate = CalendarViewEnum[CalendarViewEnum[view + offset]];
20
20
  return candidate !== undefined ? candidate : view;
21
21
  };
22
+ let nextCalendarId = 0;
22
23
  /**
23
24
  * @hidden
24
25
  */
@@ -28,6 +29,7 @@ export class BusViewService {
28
29
  this.viewChanged = new EventEmitter();
29
30
  this.bottom = CalendarViewEnum.month;
30
31
  this.top = CalendarViewEnum.century;
32
+ this.calendarId = nextCalendarId++;
31
33
  }
32
34
  configure(bottom, top) {
33
35
  this.bottom = bottom;
@@ -77,7 +77,7 @@ export class MonthViewService {
77
77
  const isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
78
78
  return {
79
79
  formattedValue: this.value(cellDate),
80
- id: `${cellUID}${cellDate.getTime()}`,
80
+ id: `${cellUID}${otherMonth ? cellDate.getTime() + '1' : cellDate.getTime()}`,
81
81
  isFocused: this.isEqual(cellDate, focusedDate),
82
82
  isSelected: isActiveView && selectedDates.some(date => this.isEqual(cellDate, date)),
83
83
  isWeekend: this.isWeekend(cellDate),