@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
@@ -61,6 +61,10 @@ export declare class DateTimePickerComponent implements OnInit, OnChanges, After
61
61
  * @hidden
62
62
  */
63
63
  get input(): DateInputComponent;
64
+ /**
65
+ * @hidden
66
+ */
67
+ get inputElement(): HTMLElement;
64
68
  /**
65
69
  * @hidden
66
70
  */
@@ -118,10 +122,6 @@ export declare class DateTimePickerComponent implements OnInit, OnChanges, After
118
122
  */
119
123
  set popupSettings(settings: PopupSettings);
120
124
  get popupSettings(): PopupSettings;
121
- /**
122
- * @hidden
123
- */
124
- focusableId: string;
125
125
  /**
126
126
  * Sets the title of the input element of the DateTimePicker.
127
127
  */
@@ -315,10 +315,6 @@ export declare class DateTimePickerComponent implements OnInit, OnChanges, After
315
315
  * The inactive tab component gets disabled and becomes inaccessible on tab click.
316
316
  */
317
317
  get disableCalendar(): boolean;
318
- /**
319
- * @hidden
320
- */
321
- get inputRole(): string;
322
318
  /**
323
319
  * @hidden
324
320
  *
@@ -391,6 +387,7 @@ export declare class DateTimePickerComponent implements OnInit, OnChanges, After
391
387
  private get appendTo();
392
388
  private container;
393
389
  private popupTemplate;
390
+ private get popupUID();
394
391
  private popupRef;
395
392
  private _popupSettings;
396
393
  private _value;
@@ -566,5 +563,5 @@ export declare class DateTimePickerComponent implements OnInit, OnChanges, After
566
563
  private handleDateCompletenessChange;
567
564
  private setComponentClasses;
568
565
  static ɵfac: i0.ɵɵFactoryDeclaration<DateTimePickerComponent, never>;
569
- static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent, "kendo-datetimepicker", ["kendo-datetimepicker"], { "value": "value"; "format": "format"; "twoDigitYearMax": "twoDigitYearMax"; "tabindex": "tabindex"; "disabledDates": "disabledDates"; "popupSettings": "popupSettings"; "focusableId": "focusableId"; "title": "title"; "disabled": "disabled"; "readonly": "readonly"; "readOnlyInput": "readOnlyInput"; "cancelButton": "cancelButton"; "formatPlaceholder": "formatPlaceholder"; "placeholder": "placeholder"; "steps": "steps"; "focusedDate": "focusedDate"; "calendarType": "calendarType"; "animateCalendarNavigation": "animateCalendarNavigation"; "weekNumber": "weekNumber"; "min": "min"; "max": "max"; "rangeValidation": "rangeValidation"; "disabledDatesValidation": "disabledDatesValidation"; "incompleteDateValidation": "incompleteDateValidation"; "defaultTab": "defaultTab"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; }, { "valueChange": "valueChange"; "open": "open"; "close": "close"; "onFocus": "focus"; "onBlur": "blur"; }, ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], never>;
566
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateTimePickerComponent, "kendo-datetimepicker", ["kendo-datetimepicker"], { "value": "value"; "format": "format"; "twoDigitYearMax": "twoDigitYearMax"; "tabindex": "tabindex"; "disabledDates": "disabledDates"; "popupSettings": "popupSettings"; "title": "title"; "disabled": "disabled"; "readonly": "readonly"; "readOnlyInput": "readOnlyInput"; "cancelButton": "cancelButton"; "formatPlaceholder": "formatPlaceholder"; "placeholder": "placeholder"; "steps": "steps"; "focusedDate": "focusedDate"; "calendarType": "calendarType"; "animateCalendarNavigation": "animateCalendarNavigation"; "weekNumber": "weekNumber"; "min": "min"; "max": "max"; "rangeValidation": "rangeValidation"; "disabledDatesValidation": "disabledDatesValidation"; "incompleteDateValidation": "incompleteDateValidation"; "defaultTab": "defaultTab"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; }, { "valueChange": "valueChange"; "open": "open"; "close": "close"; "onFocus": "focus"; "onBlur": "blur"; }, ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], never>;
570
567
  }
@@ -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
@@ -821,29 +822,46 @@ export class CalendarComponent {
821
822
  }
822
823
  }
823
824
  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);
825
+ if (this.type === 'infinite') {
826
+ // reserve the alt + arrow key commands for the picker
827
+ const ctrlKey = args.ctrlKey || args.metaKey;
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
+ if (ctrlKey && arrowKeyPressed) {
834
+ args.preventDefault();
835
+ }
836
+ // Prevent form from submitting on enter if used in datepicker (infinite view)
837
+ const preventSubmitInDatePicker = isPresent(this.pickerService) && args.keyCode === Keys.Enter;
838
+ if (preventSubmitInDatePicker) {
839
+ args.preventDefault();
840
+ }
841
+ const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(args), this.activeViewEnum), this.min, this.max);
842
+ if (!isEqual(this.focusedDate, candidate)) {
843
+ this.focusedDate = candidate;
844
+ this.detectChanges();
845
+ args.preventDefault();
846
+ }
847
+ if (args.keyCode === Keys.Enter) {
848
+ this.selectionService.lastClicked = this.focusedDate;
849
+ this.performSelection(this.focusedDate, args);
850
+ }
851
+ if (args.keyCode === Keys.KeyT) {
852
+ this.focusToday();
853
+ }
854
+ if (isArrowWithShiftPressed(args)) {
855
+ args.anyArrow = true;
856
+ this.performSelection(this.focusedDate, args);
857
+ }
845
858
  }
846
859
  }
860
+ focusToday() {
861
+ this.focusedDate = getToday();
862
+ this.bus.moveToBottom(this.activeViewEnum);
863
+ this.cdr.detectChanges();
864
+ }
847
865
  detectChanges() {
848
866
  if (!this.destroyed) {
849
867
  this.cdr.detectChanges();
@@ -855,16 +873,19 @@ export class CalendarComponent {
855
873
  }
856
874
  }
857
875
  setAriaActivedescendant() {
876
+ var _a;
858
877
  // in Classic mode, the inner MultiViewCalendar handles the activedescendant
859
- if (!isPresent(this.element) || (this.type === 'classic' && !this.element.nativeElement.hasAttribute('aria-activedescendant'))) {
878
+ const infiniteCalendarTable = (_a = this.element.nativeElement) === null || _a === void 0 ? void 0 : _a.querySelector(selectors.infiniteCalendarTable);
879
+ const activedescendantHandledByInnerMultiViewCalendar = !isPresent(infiniteCalendarTable) || (this.type === 'classic' && !infiniteCalendarTable.hasAttribute(attributeNames.ariaActiveDescendant));
880
+ if (activedescendantHandledByInnerMultiViewCalendar) {
860
881
  return;
861
882
  }
862
883
  if (this.type === 'classic') {
863
- this.renderer.removeAttribute(this.element.nativeElement, 'aria-activedescendant');
884
+ this.renderer.removeAttribute(infiniteCalendarTable, attributeNames.ariaActiveDescendant);
864
885
  return;
865
886
  }
866
887
  const focusedCellId = this.cellUID + this.focusedDate.getTime();
867
- this.renderer.setAttribute(this.element.nativeElement, 'aria-activedescendant', focusedCellId);
888
+ this.renderer.setAttribute(infiniteCalendarTable, attributeNames.ariaActiveDescendant, focusedCellId);
868
889
  }
869
890
  parseSelectionToValue(selection) {
870
891
  selection = selection || [];
@@ -887,7 +908,7 @@ export class CalendarComponent {
887
908
  }
888
909
  }
889
910
  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: [
911
+ 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
912
  BusViewService,
892
913
  CALENDAR_VALUE_ACCESSOR,
893
914
  CALENDAR_RANGE_VALIDATORS,
@@ -911,6 +932,9 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
911
932
 
912
933
  i18n-nextButtonTitle="kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar"
913
934
  nextButtonTitle="Navigate to next view"
935
+
936
+ i18n-parentViewButtonTitle="kendo.calendar.parentViewButtonTitle|The title of the parent view button in the calendar header"
937
+ parentViewButtonTitle="Navigate to parent view"
914
938
  >
915
939
  </ng-container>
916
940
  <ng-container *ngIf="type === 'infinite'">
@@ -928,6 +952,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
928
952
  <kendo-calendar-viewlist
929
953
  [activeView]="activeViewEnum"
930
954
  [isActive]="isActive"
955
+ [id]="headerId"
931
956
  [cellTemplateRef]="activeCellTemplate()?.templateRef"
932
957
  [headerTitleTemplateRef]="headerTitleTemplateRef?.templateRef"
933
958
  [weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
@@ -937,6 +962,8 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
937
962
  [focusedDate]="focusedDate"
938
963
  [weekNumber]="weekNumber"
939
964
  [selectedDates]="selectedDates"
965
+ [tabIndex]="tabIndex"
966
+ [disabled]="disabled"
940
967
  (todayButtonClick)="handleDateChange({
941
968
  selectedDates: [$event],
942
969
  focusedDate: $event
@@ -945,6 +972,8 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
945
972
  (weekNumberCellClick)="handleWeekNumberClick($event)"
946
973
  (activeDateChange)="handleActiveDateChange($event)"
947
974
  (pageChange)="onPageChange()"
975
+ (focusCalendar)="handleFocus()"
976
+ (blurCalendar)="handleBlur($event)"
948
977
  >
949
978
  </kendo-calendar-viewlist>
950
979
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
@@ -955,7 +984,9 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
955
984
  [views]="1"
956
985
  [min]="min"
957
986
  [max]="max"
987
+ [id]="id"
958
988
  [isActive]="isActive"
989
+ [tabIndex]="tabIndex"
959
990
  [activeView]="activeView"
960
991
  [bottomView]="bottomView"
961
992
  [topView]="topView"
@@ -975,7 +1006,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
975
1006
  (activeViewChange)="handleActiveViewChange($event)"
976
1007
  (navigate)="handleNavigate($event)"
977
1008
  (valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
978
- (focus)="handleFocus()"
1009
+ (focusCalendar)="handleFocus()"
979
1010
  (blur)="handleBlur($event)"
980
1011
  (keydown)="handleMultiViewCalendarKeydown($event)"
981
1012
  >
@@ -983,11 +1014,12 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
983
1014
  [today]="localization.get('today')"
984
1015
  [prevButtonTitle]="localization.get('prevButtonTitle')"
985
1016
  [nextButtonTitle]="localization.get('nextButtonTitle')"
1017
+ [parentViewButtonTitle]="localization.get('parentViewButtonTitle')"
986
1018
  >
987
1019
  </kendo-multiviewcalendar-messages>
988
1020
  </kendo-multiviewcalendar>
989
1021
  </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 });
1022
+ `, 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
1023
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CalendarComponent, decorators: [{
992
1024
  type: Component,
993
1025
  args: [{
@@ -1019,6 +1051,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1019
1051
 
1020
1052
  i18n-nextButtonTitle="kendo.calendar.nextButtonTitle|The title of the next button in the Classic calendar"
1021
1053
  nextButtonTitle="Navigate to next view"
1054
+
1055
+ i18n-parentViewButtonTitle="kendo.calendar.parentViewButtonTitle|The title of the parent view button in the calendar header"
1056
+ parentViewButtonTitle="Navigate to parent view"
1022
1057
  >
1023
1058
  </ng-container>
1024
1059
  <ng-container *ngIf="type === 'infinite'">
@@ -1036,6 +1071,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1036
1071
  <kendo-calendar-viewlist
1037
1072
  [activeView]="activeViewEnum"
1038
1073
  [isActive]="isActive"
1074
+ [id]="headerId"
1039
1075
  [cellTemplateRef]="activeCellTemplate()?.templateRef"
1040
1076
  [headerTitleTemplateRef]="headerTitleTemplateRef?.templateRef"
1041
1077
  [weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
@@ -1045,6 +1081,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1045
1081
  [focusedDate]="focusedDate"
1046
1082
  [weekNumber]="weekNumber"
1047
1083
  [selectedDates]="selectedDates"
1084
+ [tabIndex]="tabIndex"
1085
+ [disabled]="disabled"
1048
1086
  (todayButtonClick)="handleDateChange({
1049
1087
  selectedDates: [$event],
1050
1088
  focusedDate: $event
@@ -1053,6 +1091,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1053
1091
  (weekNumberCellClick)="handleWeekNumberClick($event)"
1054
1092
  (activeDateChange)="handleActiveDateChange($event)"
1055
1093
  (pageChange)="onPageChange()"
1094
+ (focusCalendar)="handleFocus()"
1095
+ (blurCalendar)="handleBlur($event)"
1056
1096
  >
1057
1097
  </kendo-calendar-viewlist>
1058
1098
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
@@ -1063,7 +1103,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1063
1103
  [views]="1"
1064
1104
  [min]="min"
1065
1105
  [max]="max"
1106
+ [id]="id"
1066
1107
  [isActive]="isActive"
1108
+ [tabIndex]="tabIndex"
1067
1109
  [activeView]="activeView"
1068
1110
  [bottomView]="bottomView"
1069
1111
  [topView]="topView"
@@ -1083,7 +1125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1083
1125
  (activeViewChange)="handleActiveViewChange($event)"
1084
1126
  (navigate)="handleNavigate($event)"
1085
1127
  (valueChange)="handleMultiViewCalendarValueChange($event, multiviewcalendar.focusedDate)"
1086
- (focus)="handleFocus()"
1128
+ (focusCalendar)="handleFocus()"
1087
1129
  (blur)="handleBlur($event)"
1088
1130
  (keydown)="handleMultiViewCalendarKeydown($event)"
1089
1131
  >
@@ -1091,6 +1133,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1091
1133
  [today]="localization.get('today')"
1092
1134
  [prevButtonTitle]="localization.get('prevButtonTitle')"
1093
1135
  [nextButtonTitle]="localization.get('nextButtonTitle')"
1136
+ [parentViewButtonTitle]="localization.get('parentViewButtonTitle')"
1094
1137
  >
1095
1138
  </kendo-multiviewcalendar-messages>
1096
1139
  </kendo-multiviewcalendar>
@@ -1206,9 +1249,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1206
1249
  }], widgetId: [{
1207
1250
  type: HostBinding,
1208
1251
  args: ['attr.id']
1209
- }], calendarTabIndex: [{
1210
- type: HostBinding,
1211
- args: ['attr.tabindex']
1212
1252
  }], ariaDisabled: [{
1213
1253
  type: HostBinding,
1214
1254
  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: [{