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

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 (54) 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 +16 -6
  15. package/datepicker/datepicker.component.d.ts +1 -5
  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 +5 -4
  22. package/esm2015/calendar/calendar.component.js +85 -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 +87 -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 +52 -23
  36. package/esm2015/datepicker/datepicker.component.js +25 -11
  37. package/esm2015/daterange/date-range-end-input.directive.js +5 -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 +7 -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 +36 -11
  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 +71 -24
  49. package/esm2015/util.js +2 -2
  50. package/fesm2015/kendo-angular-dateinputs.js +773 -280
  51. package/package.json +1 -1
  52. package/timepicker/localization/messages.d.ts +21 -1
  53. package/timepicker/timelist.component.d.ts +10 -1
  54. package/timepicker/timepicker.component.d.ts +5 -7
@@ -31,7 +31,7 @@ import { maxValidator } from '../validators/max.validator';
31
31
  import { MIN_DATE, MAX_DATE } from '../defaults';
32
32
  import { areDatesEqual, dateInRange, getToday, hasExistingValue, last, noop } from '../util';
33
33
  import { closest } from '../common/dom-queries';
34
- import { requiresZoneOnBlur, preventDefault, isPresent } from '../common/utils';
34
+ import { requiresZoneOnBlur, preventDefault, isPresent, isArrowWithShiftPressed, selectors, attributeNames } from '../common/utils';
35
35
  import { from as fromPromise } from 'rxjs';
36
36
  import * as i0 from "@angular/core";
37
37
  import * as i1 from "./services/bus-view.service";
@@ -107,10 +107,6 @@ export class CalendarComponent {
107
107
  this.localization = localization;
108
108
  this.selectionService = selectionService;
109
109
  this.pickerService = pickerService;
110
- /**
111
- * @hidden
112
- */
113
- this.id = guid();
114
110
  /**
115
111
  * Determines whether the built-in min or max validators are enforced when validating a form.
116
112
  */
@@ -213,6 +209,7 @@ export class CalendarComponent {
213
209
  this.resolvedPromise = Promise.resolve(null);
214
210
  this.destroyed = false;
215
211
  validatePackage(packageMetadata);
212
+ this.id = `kendo-calendarid-${this.bus.calendarId}-`;
216
213
  this.setClasses(element.nativeElement);
217
214
  if (this.pickerService) {
218
215
  this.pickerService.calendar = this;
@@ -237,6 +234,12 @@ export class CalendarComponent {
237
234
  this._focusedDate = focusedDate || getToday();
238
235
  this.setAriaActivedescendant();
239
236
  }
237
+ /**
238
+ * @hidden
239
+ */
240
+ get headerId() {
241
+ return this.id + 'header-';
242
+ }
240
243
  get focusedDate() {
241
244
  return this._focusedDate;
242
245
  }
@@ -432,10 +435,6 @@ export class CalendarComponent {
432
435
  get widgetId() {
433
436
  return this.id;
434
437
  }
435
- get calendarTabIndex() {
436
- // in Classic mode, the inner MultiViewCalendar is the focusable element
437
- return this.disabled || this.type === 'classic' ? undefined : this.tabIndex;
438
- }
439
438
  get ariaDisabled() {
440
439
  // in Classic mode, the inner MultiViewCalendar should handle the disabled class and aria attr
441
440
  return this.type === 'classic' ? undefined : this.disabled;
@@ -506,7 +505,7 @@ export class CalendarComponent {
506
505
  this.cdr.detectChanges();
507
506
  }
508
507
  /**
509
- * Focuses the host element of the Calendar.
508
+ * Focuses the Calendar by making the table.k-calendar-table element active.
510
509
  *
511
510
  * @example
512
511
  * ```ts
@@ -521,19 +520,18 @@ export class CalendarComponent {
521
520
  * ```
522
521
  */
523
522
  focus() {
524
- const focusTarget = this.type === 'infinite' ?
525
- this.element && this.element.nativeElement :
526
- this.multiViewCalendar;
527
- if (isPresent(focusTarget)) {
528
- focusTarget.focus();
529
- }
523
+ var _a, _b, _c;
524
+ this.currentlyFocusedElement = this.type === 'infinite' ?
525
+ (_a = this.element) === null || _a === void 0 ? void 0 : _a.nativeElement.querySelector(selectors.infiniteCalendarTable) :
526
+ this.currentlyFocusedElement = (_b = this.element) === null || _b === void 0 ? void 0 : _b.nativeElement.querySelector(selectors.multiViewCalendarTable);
527
+ (_c = this.currentlyFocusedElement) === null || _c === void 0 ? void 0 : _c.focus();
530
528
  }
531
529
  /**
532
530
  * Blurs the Calendar component.
533
531
  */
534
532
  blur() {
535
533
  const blurTarget = this.type === 'infinite' ?
536
- this.element && this.element.nativeElement :
534
+ this.currentlyFocusedElement :
537
535
  this.multiViewCalendar;
538
536
  if (isPresent(blurTarget)) {
539
537
  blurTarget.blur();
@@ -710,6 +708,8 @@ export class CalendarComponent {
710
708
  * @hidden
711
709
  */
712
710
  handleCellClick({ date, modifiers }) {
711
+ this.focus();
712
+ this.selectionService.lastClicked = date;
713
713
  this.performSelection(date, modifiers);
714
714
  }
715
715
  /**
@@ -733,6 +733,7 @@ export class CalendarComponent {
733
733
  if (this.element.nativeElement.contains(args.relatedTarget)) {
734
734
  return;
735
735
  }
736
+ ;
736
737
  this.isActive = false;
737
738
  // the injector can get the NgControl instance of the parent component (for example, the DateTimePicker)
738
739
  // and enters the zone for no reason because the parent component is still untouched
@@ -770,6 +771,7 @@ export class CalendarComponent {
770
771
  setClasses(element) {
771
772
  this.renderer.addClass(element, 'k-widget');
772
773
  this.renderer.addClass(element, 'k-calendar');
774
+ this.renderer.addClass(element, 'k-calendar-md');
773
775
  this.renderer.addClass(element, `k-calendar-${this.type}`);
774
776
  }
775
777
  verifyChanges() {
@@ -821,29 +823,42 @@ export class CalendarComponent {
821
823
  }
822
824
  }
823
825
  handleKeydown(args) {
824
- const headerActive = this.type === 'classic' && this.multiViewCalendar.isHeaderActive;
825
- if (headerActive) {
826
- return;
827
- }
828
- // reserve the alt + arrow key commands for the picker
829
- const arrowKeyPressed = [Keys.ArrowUp, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowLeft].indexOf(args.keyCode) !== -1;
830
- if (isPresent(this.pickerService) && arrowKeyPressed && args.altKey) {
831
- return;
832
- }
833
- // Prevent form from submitting on enter if used in datepicker (infinite view)
834
- if (isPresent(this.pickerService) && args.keyCode === Keys.Enter) {
835
- args.preventDefault();
836
- }
837
- const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(args), this.activeViewEnum), this.min, this.max);
838
- if (!isEqual(this.focusedDate, candidate)) {
839
- this.focusedDate = candidate;
840
- this.detectChanges();
841
- args.preventDefault();
842
- }
843
- if (args.keyCode === Keys.Enter) {
844
- this.performSelection(this.focusedDate, args);
826
+ if (this.type === 'infinite') {
827
+ // reserve the alt + arrow key commands for the picker
828
+ const arrowKeyPressed = [Keys.ArrowUp, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowLeft].indexOf(args.keyCode) !== -1;
829
+ const reserveKeyCommandsForPicker = isPresent(this.pickerService) && arrowKeyPressed && args.altKey;
830
+ if (reserveKeyCommandsForPicker) {
831
+ return;
832
+ }
833
+ // Prevent form from submitting on enter if used in datepicker (infinite view)
834
+ const preventSubmitInDatePicker = isPresent(this.pickerService) && args.keyCode === Keys.Enter;
835
+ if (preventSubmitInDatePicker) {
836
+ args.preventDefault();
837
+ }
838
+ const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(args), this.activeViewEnum), this.min, this.max);
839
+ if (!isEqual(this.focusedDate, candidate)) {
840
+ this.focusedDate = candidate;
841
+ this.detectChanges();
842
+ args.preventDefault();
843
+ }
844
+ if (args.keyCode === Keys.Enter) {
845
+ this.selectionService.lastClicked = this.focusedDate;
846
+ this.performSelection(this.focusedDate, args);
847
+ }
848
+ if (args.keyCode === Keys.KeyT) {
849
+ this.focusToday();
850
+ }
851
+ if (isArrowWithShiftPressed(args)) {
852
+ args.anyArrow = true;
853
+ this.performSelection(this.focusedDate, args);
854
+ }
845
855
  }
846
856
  }
857
+ focusToday() {
858
+ this.focusedDate = getToday();
859
+ this.bus.moveToBottom(this.activeViewEnum);
860
+ this.cdr.detectChanges();
861
+ }
847
862
  detectChanges() {
848
863
  if (!this.destroyed) {
849
864
  this.cdr.detectChanges();
@@ -855,16 +870,19 @@ export class CalendarComponent {
855
870
  }
856
871
  }
857
872
  setAriaActivedescendant() {
873
+ var _a;
858
874
  // in Classic mode, the inner MultiViewCalendar handles the activedescendant
859
- if (!isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
875
+ const infiniteCalendarTable = (_a = this.element.nativeElement) === null || _a === void 0 ? void 0 : _a.querySelector(selectors.infiniteCalendarTable);
876
+ const activedescendantHandledByInnerMultiViewCalendar = !isPresent(infiniteCalendarTable) || (this.type === 'classic' && !infiniteCalendarTable.hasAttribute(attributeNames.ariaActiveDescendant));
877
+ if (activedescendantHandledByInnerMultiViewCalendar) {
860
878
  return;
861
879
  }
862
880
  if (this.type === 'classic') {
863
- this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
881
+ this.renderer.removeAttribute(infiniteCalendarTable, attributeNames.ariaActiveDescendant);
864
882
  return;
865
883
  }
866
884
  const focusedCellId = this.cellUID + this.focusedDate.getTime();
867
- this.renderer.setAttribute(this.element.nativeElement, 'aria-activedescendant', focusedCellId);
885
+ this.renderer.setAttribute(infiniteCalendarTable, attributeNames.ariaActiveDescendant, focusedCellId);
868
886
  }
869
887
  parseSelectionToValue(selection) {
870
888
  selection = selection || [];
@@ -887,7 +905,7 @@ export class CalendarComponent {
887
905
  }
888
906
  }
889
907
  CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarComponent, deps: [{ token: i1.BusViewService }, { token: i2.CalendarDOMService }, { token: i0.ElementRef }, { token: i3.NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i4.ScrollSyncService }, { token: i5.DisabledDatesService }, { token: i6.LocalizationService }, { token: i7.SelectionService }, { token: i8.PickerService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
890
- CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CalendarComponent, selector: "kendo-calendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", navigation: "navigation", activeView: "activeView", bottomView: "bottomView", topView: "topView", type: "type", animateNavigation: "animateNavigation", weekNumber: "weekNumber", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", activeViewDateChange: "activeViewDateChange", valueChange: "valueChange" }, host: { properties: { "class.k-week-number": "this.weekNumber", "attr.id": "this.widgetId", "attr.tabindex": "this.calendarTabIndex", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
908
+ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CalendarComponent, selector: "kendo-calendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", navigation: "navigation", activeView: "activeView", bottomView: "bottomView", topView: "topView", type: "type", animateNavigation: "animateNavigation", weekNumber: "weekNumber", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", activeViewDateChange: "activeViewDateChange", valueChange: "valueChange" }, host: { properties: { "class.k-week-number": "this.weekNumber", "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
891
909
  BusViewService,
892
910
  CALENDAR_VALUE_ACCESSOR,
893
911
  CALENDAR_RANGE_VALIDATORS,
@@ -911,6 +929,9 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
911
929
 
912
930
  i18n-nextButtonTitle="kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar"
913
931
  nextButtonTitle="Navigate to next view"
932
+
933
+ i18n-parentViewButtonTitle="kendo.calendar.parentViewButtonTitle|The title of the parent view button in the calendar header"
934
+ parentViewButtonTitle="Navigate to parent view"
914
935
  >
915
936
  </ng-container>
916
937
  <ng-container *ngIf="type === 'infinite'">
@@ -928,6 +949,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
928
949
  <kendo-calendar-viewlist
929
950
  [activeView]="activeViewEnum"
930
951
  [isActive]="isActive"
952
+ [id]="headerId"
931
953
  [cellTemplateRef]="activeCellTemplate()?.templateRef"
932
954
  [headerTitleTemplateRef]="headerTitleTemplateRef?.templateRef"
933
955
  [weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
@@ -937,6 +959,8 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
937
959
  [focusedDate]="focusedDate"
938
960
  [weekNumber]="weekNumber"
939
961
  [selectedDates]="selectedDates"
962
+ [tabIndex]="tabIndex"
963
+ [disabled]="disabled"
940
964
  (todayButtonClick)="handleDateChange({
941
965
  selectedDates: [$event],
942
966
  focusedDate: $event
@@ -945,6 +969,8 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
945
969
  (weekNumberCellClick)="handleWeekNumberClick($event)"
946
970
  (activeDateChange)="handleActiveDateChange($event)"
947
971
  (pageChange)="onPageChange()"
972
+ (focusCalendar)="handleFocus()"
973
+ (blurCalendar)="handleBlur($event)"
948
974
  >
949
975
  </kendo-calendar-viewlist>
950
976
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
@@ -955,7 +981,9 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
955
981
  [views]="1"
956
982
  [min]="min"
957
983
  [max]="max"
984
+ [id]="id"
958
985
  [isActive]="isActive"
986
+ [tabIndex]="tabIndex"
959
987
  [activeView]="activeView"
960
988
  [bottomView]="bottomView"
961
989
  [topView]="topView"
@@ -975,7 +1003,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
975
1003
  (activeViewChange)="handleActiveViewChange($event)"
976
1004
  (navigate)="handleNavigate($event)"
977
1005
  (valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
978
- (focus)="handleFocus()"
1006
+ (focusCalendar)="handleFocus()"
979
1007
  (blur)="handleBlur($event)"
980
1008
  (keydown)="handleMultiViewCalendarKeydown($event)"
981
1009
  >
@@ -983,11 +1011,12 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
983
1011
  [today]="localization.get('today')"
984
1012
  [prevButtonTitle]="localization.get('prevButtonTitle')"
985
1013
  [nextButtonTitle]="localization.get('nextButtonTitle')"
1014
+ [parentViewButtonTitle]="localization.get('parentViewButtonTitle')"
986
1015
  >
987
1016
  </kendo-multiviewcalendar-messages>
988
1017
  </kendo-multiviewcalendar>
989
1018
  </ng-container>
990
- `, isInline: true, components: [{ type: i9.NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { type: i10.ViewListComponent, selector: "kendo-calendar-viewlist", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "headerTitleTemplateRef", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectedDates", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange"] }, { type: i11.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i12.MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur"], exportAs: ["kendo-multiviewcalendar"] }, { type: i13.MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }], directives: [{ type: i14.CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { type: i15.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1019
+ `, isInline: true, components: [{ type: i9.NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { type: i10.ViewListComponent, selector: "kendo-calendar-viewlist", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "headerTitleTemplateRef", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectedDates", "tabIndex", "disabled", "id", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }, { type: i11.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i12.MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur", "focusCalendar"], exportAs: ["kendo-multiviewcalendar"] }, { type: i13.MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }], directives: [{ type: i14.CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { type: i15.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
991
1020
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarComponent, decorators: [{
992
1021
  type: Component,
993
1022
  args: [{
@@ -1019,6 +1048,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1019
1048
 
1020
1049
  i18n-nextButtonTitle="kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar"
1021
1050
  nextButtonTitle="Navigate to next view"
1051
+
1052
+ i18n-parentViewButtonTitle="kendo.calendar.parentViewButtonTitle|The title of the parent view button in the calendar header"
1053
+ parentViewButtonTitle="Navigate to parent view"
1022
1054
  >
1023
1055
  </ng-container>
1024
1056
  <ng-container *ngIf="type === 'infinite'">
@@ -1036,6 +1068,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1036
1068
  <kendo-calendar-viewlist
1037
1069
  [activeView]="activeViewEnum"
1038
1070
  [isActive]="isActive"
1071
+ [id]="headerId"
1039
1072
  [cellTemplateRef]="activeCellTemplate()?.templateRef"
1040
1073
  [headerTitleTemplateRef]="headerTitleTemplateRef?.templateRef"
1041
1074
  [weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
@@ -1045,6 +1078,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1045
1078
  [focusedDate]="focusedDate"
1046
1079
  [weekNumber]="weekNumber"
1047
1080
  [selectedDates]="selectedDates"
1081
+ [tabIndex]="tabIndex"
1082
+ [disabled]="disabled"
1048
1083
  (todayButtonClick)="handleDateChange({
1049
1084
  selectedDates: [$event],
1050
1085
  focusedDate: $event
@@ -1053,6 +1088,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1053
1088
  (weekNumberCellClick)="handleWeekNumberClick($event)"
1054
1089
  (activeDateChange)="handleActiveDateChange($event)"
1055
1090
  (pageChange)="onPageChange()"
1091
+ (focusCalendar)="handleFocus()"
1092
+ (blurCalendar)="handleBlur($event)"
1056
1093
  >
1057
1094
  </kendo-calendar-viewlist>
1058
1095
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
@@ -1063,7 +1100,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1063
1100
  [views]="1"
1064
1101
  [min]="min"
1065
1102
  [max]="max"
1103
+ [id]="id"
1066
1104
  [isActive]="isActive"
1105
+ [tabIndex]="tabIndex"
1067
1106
  [activeView]="activeView"
1068
1107
  [bottomView]="bottomView"
1069
1108
  [topView]="topView"
@@ -1083,7 +1122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1083
1122
  (activeViewChange)="handleActiveViewChange($event)"
1084
1123
  (navigate)="handleNavigate($event)"
1085
1124
  (valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
1086
- (focus)="handleFocus()"
1125
+ (focusCalendar)="handleFocus()"
1087
1126
  (blur)="handleBlur($event)"
1088
1127
  (keydown)="handleMultiViewCalendarKeydown($event)"
1089
1128
  >
@@ -1091,6 +1130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1091
1130
  [today]="localization.get('today')"
1092
1131
  [prevButtonTitle]="localization.get('prevButtonTitle')"
1093
1132
  [nextButtonTitle]="localization.get('nextButtonTitle')"
1133
+ [parentViewButtonTitle]="localization.get('parentViewButtonTitle')"
1094
1134
  >
1095
1135
  </kendo-multiviewcalendar-messages>
1096
1136
  </kendo-multiviewcalendar>
@@ -1206,9 +1246,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1206
1246
  }], widgetId: [{
1207
1247
  type: HostBinding,
1208
1248
  args: ['attr.id']
1209
- }], calendarTabIndex: [{
1210
- type: HostBinding,
1211
- args: ['attr.tabindex']
1212
1249
  }], ariaDisabled: [{
1213
1250
  type: HostBinding,
1214
1251
  args: ['attr.aria-disabled']
@@ -58,6 +58,7 @@ export class HeaderComponent {
58
58
  }
59
59
  this.activeViewValue = CalendarViewEnum[this.activeView];
60
60
  this.todayMessage = this.localization.get('today');
61
+ this.parentViewButtonTitle = this.localization.get('parentViewButtonTitle');
61
62
  this.setTodayAvailability();
62
63
  this.navigate = this.bus.canMoveUp(this.activeView);
63
64
  this.title = this.getTitle();
@@ -78,6 +79,9 @@ export class HeaderComponent {
78
79
  }
79
80
  this.bus.moveUp(this.activeView);
80
81
  }
82
+ isDisabled() {
83
+ return this.navigate ? null : '';
84
+ }
81
85
  intlChange() {
82
86
  if (this.currentDate && this.bus.service(this.activeView)) {
83
87
  this.title = this.getTitle();
@@ -87,6 +91,7 @@ export class HeaderComponent {
87
91
  l10nChange() {
88
92
  this.prevButtonTitle = this.localization.get('prevButtonTitle');
89
93
  this.nextButtonTitle = this.localization.get('nextButtonTitle');
94
+ this.parentViewButtonTitle = this.localization.get('parentViewButtonTitle');
90
95
  this.todayMessage = this.localization.get('today');
91
96
  this.cdr.markForCheck();
92
97
  }
@@ -112,11 +117,17 @@ export class HeaderComponent {
112
117
  }
113
118
  }
114
119
  HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeaderComponent, deps: [{ token: i1.BusViewService }, { token: i0.ChangeDetectorRef }, { token: i2.LocalizationService }, { token: i3.IntlService }, { token: i4.DisabledDatesService }], target: i0.ɵɵFactoryTarget.Component });
115
- HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HeaderComponent, selector: "kendo-calendar-header", inputs: { activeView: "activeView", currentDate: "currentDate", min: "min", max: "max", rangeLength: "rangeLength", templateRef: "templateRef", isPrevDisabled: "isPrevDisabled", isNextDisabled: "isNextDisabled", showNavigationButtons: "showNavigationButtons", orientation: "orientation" }, outputs: { todayButtonClick: "todayButtonClick", prevButtonClick: "prevButtonClick", nextButtonClick: "nextButtonClick" }, host: { properties: { "class.k-calendar-header": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass" } }, usesOnChanges: true, ngImport: i0, template: `
116
- <span class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title" [class.k-disabled]="!navigate"
120
+ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: HeaderComponent, selector: "kendo-calendar-header", inputs: { activeView: "activeView", currentDate: "currentDate", min: "min", max: "max", rangeLength: "rangeLength", templateRef: "templateRef", isPrevDisabled: "isPrevDisabled", isNextDisabled: "isNextDisabled", showNavigationButtons: "showNavigationButtons", orientation: "orientation", id: "id" }, outputs: { todayButtonClick: "todayButtonClick", prevButtonClick: "prevButtonClick", nextButtonClick: "nextButtonClick" }, host: { properties: { "class.k-calendar-header": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass" } }, usesOnChanges: true, ngImport: i0, template: `
121
+ <span class="k-button k-nav-fast k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title"
122
+ role="button"
123
+ [id]="id"
124
+ tabindex="-1"
125
+ [class.k-disabled]="!navigate"
126
+ [attr.aria-disabled]="isDisabled()"
117
127
  [kendoEventsOutsideAngular]="{
118
128
  click: handleNavigation
119
129
  }"
130
+ [title]="parentViewButtonTitle"
120
131
  [scope]="this">
121
132
  <ng-template [ngIf]="!templateRef">{{title}}</ng-template>
122
133
  <ng-template
@@ -130,6 +141,7 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
130
141
  <button
131
142
  *ngIf="showNavigationButtons"
132
143
  class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-calendar-nav-prev"
144
+ tabindex="-1"
133
145
  type="button"
134
146
  [attr.aria-disabled]="isPrevDisabled"
135
147
  [disabled]="isPrevDisabled"
@@ -140,17 +152,20 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
140
152
  </button>
141
153
  <span
142
154
  class="k-today k-calendar-nav-today"
155
+ tabindex="-1"
143
156
  [class.k-disabled]="!todayAvailable"
144
157
  [kendoEventsOutsideAngular]="{
145
158
  click: handleTodayClick
146
159
  }"
147
160
  [scope]="this"
161
+ role="link"
148
162
  >
149
163
  {{ todayMessage }}
150
164
  </span>
151
165
  <button
152
166
  *ngIf="showNavigationButtons"
153
167
  class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-calendar-nav-next"
168
+ tabindex="-1"
154
169
  type="button"
155
170
  [attr.aria-disabled]="isNextDisabled"
156
171
  [disabled]="isNextDisabled"
@@ -166,10 +181,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
166
181
  args: [{
167
182
  selector: 'kendo-calendar-header',
168
183
  template: `
169
- <span class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title" [class.k-disabled]="!navigate"
184
+ <span class="k-button k-nav-fast k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title"
185
+ role="button"
186
+ [id]="id"
187
+ tabindex="-1"
188
+ [class.k-disabled]="!navigate"
189
+ [attr.aria-disabled]="isDisabled()"
170
190
  [kendoEventsOutsideAngular]="{
171
191
  click: handleNavigation
172
192
  }"
193
+ [title]="parentViewButtonTitle"
173
194
  [scope]="this">
174
195
  <ng-template [ngIf]="!templateRef">{{title}}</ng-template>
175
196
  <ng-template
@@ -183,6 +204,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
183
204
  <button
184
205
  *ngIf="showNavigationButtons"
185
206
  class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-calendar-nav-prev"
207
+ tabindex="-1"
186
208
  type="button"
187
209
  [attr.aria-disabled]="isPrevDisabled"
188
210
  [disabled]="isPrevDisabled"
@@ -193,17 +215,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
193
215
  </button>
194
216
  <span
195
217
  class="k-today k-calendar-nav-today"
218
+ tabindex="-1"
196
219
  [class.k-disabled]="!todayAvailable"
197
220
  [kendoEventsOutsideAngular]="{
198
221
  click: handleTodayClick
199
222
  }"
200
223
  [scope]="this"
224
+ role="link"
201
225
  >
202
226
  {{ todayMessage }}
203
227
  </span>
204
228
  <button
205
229
  *ngIf="showNavigationButtons"
206
230
  class="k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-calendar-nav-next"
231
+ tabindex="-1"
207
232
  type="button"
208
233
  [attr.aria-disabled]="isNextDisabled"
209
234
  [disabled]="isNextDisabled"
@@ -235,6 +260,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
235
260
  type: Input
236
261
  }], orientation: [{
237
262
  type: Input
263
+ }], id: [{
264
+ type: Input
238
265
  }], todayButtonClick: [{
239
266
  type: Output
240
267
  }], prevButtonClick: [{