@progress/kendo-angular-dateinputs 16.0.0-develop.9 → 16.0.0

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 (115) hide show
  1. package/calendar/calendar.component.d.ts +43 -8
  2. package/calendar/header.component.d.ts +3 -2
  3. package/calendar/horizontal-view-list.component.d.ts +4 -3
  4. package/calendar/models/cell-context.interface.d.ts +4 -0
  5. package/calendar/models/selection-range.interface.d.ts +2 -2
  6. package/calendar/models/selection.d.ts +11 -1
  7. package/calendar/multiview-calendar.component.d.ts +58 -8
  8. package/calendar/view-list.component.d.ts +9 -1
  9. package/calendar/view.component.d.ts +2 -1
  10. package/common/utils.d.ts +4 -0
  11. package/dateinput/dateinput.component.d.ts +13 -1
  12. package/dateinput/localization/messages.d.ts +5 -1
  13. package/datepicker/datepicker.component.d.ts +7 -2
  14. package/datepicker/localization/messages.d.ts +5 -1
  15. package/daterange/date-range-popup.component.d.ts +30 -2
  16. package/daterange/date-range.component.d.ts +16 -1
  17. package/datetimepicker/datetimepicker.component.d.ts +12 -1
  18. package/datetimepicker/localization/messages.d.ts +5 -1
  19. package/esm2020/calendar/calendar-common.module.mjs +4 -4
  20. package/esm2020/calendar/calendar.component.mjs +258 -60
  21. package/esm2020/calendar/calendar.module.mjs +4 -4
  22. package/esm2020/calendar/calendars.module.mjs +4 -4
  23. package/esm2020/calendar/footer.component.mjs +3 -3
  24. package/esm2020/calendar/for.directive.mjs +3 -3
  25. package/esm2020/calendar/header.component.mjs +41 -23
  26. package/esm2020/calendar/horizontal-view-list.component.mjs +13 -9
  27. package/esm2020/calendar/localization/calendar-custom-messages.component.mjs +3 -3
  28. package/esm2020/calendar/localization/calendar-localized-messages.directive.mjs +3 -3
  29. package/esm2020/calendar/localization/calendar-messages.mjs +3 -3
  30. package/esm2020/calendar/localization/multiview-calendar-custom-messages.component.mjs +3 -3
  31. package/esm2020/calendar/localization/multiview-calendar-localized-messages.directive.mjs +3 -3
  32. package/esm2020/calendar/localization/multiview-calendar-messages.mjs +3 -3
  33. package/esm2020/calendar/models/selection.mjs +35 -1
  34. package/esm2020/calendar/multiview-calendar.component.mjs +276 -52
  35. package/esm2020/calendar/multiview-calendar.module.mjs +4 -4
  36. package/esm2020/calendar/navigation.component.mjs +3 -3
  37. package/esm2020/calendar/services/bus-view.service.mjs +3 -3
  38. package/esm2020/calendar/services/century-view.service.mjs +29 -8
  39. package/esm2020/calendar/services/decade-view.service.mjs +29 -8
  40. package/esm2020/calendar/services/disabled-dates.service.mjs +3 -3
  41. package/esm2020/calendar/services/dom.service.mjs +5 -5
  42. package/esm2020/calendar/services/month-view.service.mjs +29 -8
  43. package/esm2020/calendar/services/navigation.service.mjs +3 -3
  44. package/esm2020/calendar/services/scroll-sync.service.mjs +3 -3
  45. package/esm2020/calendar/services/selection.service.mjs +3 -3
  46. package/esm2020/calendar/services/weeknames.service.mjs +3 -3
  47. package/esm2020/calendar/services/year-view.service.mjs +29 -8
  48. package/esm2020/calendar/templates/cell-template.directive.mjs +3 -3
  49. package/esm2020/calendar/templates/century-cell-template.directive.mjs +3 -3
  50. package/esm2020/calendar/templates/decade-cell-template.directive.mjs +3 -3
  51. package/esm2020/calendar/templates/footer-template.directiv/320/265.mjs +3 -3
  52. package/esm2020/calendar/templates/header-template.directive.mjs +3 -3
  53. package/esm2020/calendar/templates/header-title-template.directive.mjs +3 -3
  54. package/esm2020/calendar/templates/month-cell-template.directive.mjs +3 -3
  55. package/esm2020/calendar/templates/navigation-item-template.directive.mjs +3 -3
  56. package/esm2020/calendar/templates/weeknumber-cell-template.directive.mjs +3 -3
  57. package/esm2020/calendar/templates/year-cell-template.directive.mjs +3 -3
  58. package/esm2020/calendar/templates.module.mjs +4 -4
  59. package/esm2020/calendar/view-list.component.mjs +26 -5
  60. package/esm2020/calendar/view.component.mjs +8 -5
  61. package/esm2020/common/adaptive.module.mjs +4 -4
  62. package/esm2020/common/utils.mjs +5 -1
  63. package/esm2020/dateinput/dateinput.component.mjs +65 -4
  64. package/esm2020/dateinput/dateinput.module.mjs +4 -4
  65. package/esm2020/dateinput/localization/dateinput-custom-messages.component.mjs +3 -3
  66. package/esm2020/dateinput/localization/dateinput-localized-messages.directive.mjs +3 -3
  67. package/esm2020/dateinput/localization/messages.mjs +5 -3
  68. package/esm2020/dateinputs.module.mjs +4 -4
  69. package/esm2020/datepicker/datepicker.component.mjs +43 -18
  70. package/esm2020/datepicker/datepicker.module.mjs +4 -4
  71. package/esm2020/datepicker/localization/datepicker-custom-messages.component.mjs +3 -3
  72. package/esm2020/datepicker/localization/datepicker-localized-messages.directive.mjs +3 -3
  73. package/esm2020/datepicker/localization/messages.mjs +5 -3
  74. package/esm2020/daterange/date-range-end-input.directive.mjs +3 -3
  75. package/esm2020/daterange/date-range-input.mjs +3 -3
  76. package/esm2020/daterange/date-range-popup-template.directive.mjs +3 -3
  77. package/esm2020/daterange/date-range-popup.component.mjs +70 -13
  78. package/esm2020/daterange/date-range-selection.directive.mjs +3 -3
  79. package/esm2020/daterange/date-range-start-input.directive.mjs +3 -3
  80. package/esm2020/daterange/date-range.component.mjs +10 -8
  81. package/esm2020/daterange/date-range.module.mjs +4 -4
  82. package/esm2020/daterange/date-range.service.mjs +3 -3
  83. package/esm2020/daterange/localization/daterange-popup-custom-messages.component.mjs +3 -3
  84. package/esm2020/daterange/localization/daterange-popup-localized-messages.directive.mjs +3 -3
  85. package/esm2020/daterange/localization/messages.mjs +3 -3
  86. package/esm2020/datetimepicker/datetimepicker.component.mjs +54 -16
  87. package/esm2020/datetimepicker/datetimepicker.module.mjs +4 -4
  88. package/esm2020/datetimepicker/localization/datetimepicker-custom-messages.component.mjs +3 -3
  89. package/esm2020/datetimepicker/localization/localized-messages.directive.mjs +3 -3
  90. package/esm2020/datetimepicker/localization/messages.mjs +5 -3
  91. package/esm2020/package-metadata.mjs +2 -2
  92. package/esm2020/timepicker/localization/messages.mjs +5 -3
  93. package/esm2020/timepicker/localization/timepicker-custom-messages.component.mjs +3 -3
  94. package/esm2020/timepicker/localization/timepicker-localized-messages.directive.mjs +3 -3
  95. package/esm2020/timepicker/localization/timeselector-custom-messages.component.mjs +3 -3
  96. package/esm2020/timepicker/localization/timeselector-localized-messages.directive.mjs +3 -3
  97. package/esm2020/timepicker/services/dayperiod.service.mjs +3 -3
  98. package/esm2020/timepicker/services/dom.service.mjs +3 -3
  99. package/esm2020/timepicker/services/hours.service.mjs +3 -3
  100. package/esm2020/timepicker/services/milliseconds.service.mjs +3 -3
  101. package/esm2020/timepicker/services/minutes.service.mjs +3 -3
  102. package/esm2020/timepicker/services/seconds.service.mjs +3 -3
  103. package/esm2020/timepicker/timelist.component.mjs +3 -3
  104. package/esm2020/timepicker/timepicker.component.mjs +41 -13
  105. package/esm2020/timepicker/timepicker.module.mjs +4 -4
  106. package/esm2020/timepicker/timeselector.component.mjs +24 -9
  107. package/esm2020/virtualization/virtualization.component.mjs +3 -3
  108. package/esm2020/virtualization/virtualization.module.mjs +4 -4
  109. package/fesm2015/progress-kendo-angular-dateinputs.mjs +1344 -508
  110. package/fesm2020/progress-kendo-angular-dateinputs.mjs +1329 -507
  111. package/package.json +9 -9
  112. package/schematics/ngAdd/index.js +1 -1
  113. package/timepicker/localization/messages.d.ts +5 -1
  114. package/timepicker/timepicker.component.d.ts +7 -1
  115. package/timepicker/timeselector.component.d.ts +2 -1
@@ -6,7 +6,7 @@ import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, Ev
6
6
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
7
7
  import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
8
8
  import { cloneDate, isEqual } from '@progress/kendo-date-math';
9
- import { hasObservers, KendoInput, guid, Keys } from '@progress/kendo-angular-common';
9
+ import { hasObservers, KendoInput, guid, Keys, isObject } from '@progress/kendo-angular-common';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { packageMetadata } from '../package-metadata';
12
12
  import { MultiViewCalendarComponent } from './multiview-calendar.component';
@@ -28,12 +28,13 @@ import { HeaderTitleTemplateDirective } from './templates/header-title-template.
28
28
  import { NavigationItemTemplateDirective } from './templates/navigation-item-template.directive';
29
29
  import { PickerService } from '../common/picker.service';
30
30
  import { CalendarViewEnum } from './models/view.enum';
31
+ import { handleRangeSelection } from './models/selection';
31
32
  import { minValidator } from '../validators/min.validator';
32
33
  import { maxValidator } from '../validators/max.validator';
33
34
  import { MIN_DATE, MAX_DATE } from '../defaults';
34
35
  import { areDatesEqual, dateInRange, DEFAULT_SIZE, getSizeClass, getToday, hasExistingValue, last, noop } from '../util';
35
36
  import { closest } from '../common/dom-queries';
36
- import { requiresZoneOnBlur, preventDefault, isPresent, isArrowWithShiftPressed, selectors, attributeNames } from '../common/utils';
37
+ import { requiresZoneOnBlur, preventDefault, isPresent, isArrowWithShiftPressed, selectors, attributeNames, isNullOrDate } from '../common/utils';
37
38
  import { from as fromPromise } from 'rxjs';
38
39
  import { HeaderTemplateDirective } from './templates/header-template.directive';
39
40
  import { FooterTemplateDirective } from './templates/footer-template.directivе';
@@ -125,15 +126,14 @@ export class CalendarComponent {
125
126
  * @default false
126
127
  */
127
128
  this.footer = false;
129
+ this._selection = 'single';
128
130
  /**
129
- * Sets the Calendar selection mode
130
- * ([see example]({% slug multiple_selection_calendar %})).
131
+ * Allows reverse selection when using `range` selection.
132
+ * If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
131
133
  *
132
- * The available values are:
133
- * * `single` (default)
134
- * * `multiple`
134
+ * @default false
135
135
  */
136
- this.selection = 'single';
136
+ this.allowReverse = false;
137
137
  /**
138
138
  * Sets or gets the `disabled` property of the Calendar and
139
139
  * determines whether the component is active
@@ -218,8 +218,10 @@ export class CalendarComponent {
218
218
  */
219
219
  this.valueChange = new EventEmitter();
220
220
  this._size = DEFAULT_SIZE;
221
+ this._activeRangeEnd = 'start';
221
222
  this.isActive = false;
222
223
  this.cellUID = guid();
224
+ this.selectionRange = { start: null, end: null };
223
225
  this.selectedDates = [];
224
226
  this._min = new Date(MIN_DATE);
225
227
  this._max = new Date(MAX_DATE);
@@ -229,14 +231,17 @@ export class CalendarComponent {
229
231
  this.onValidatorChange = noop;
230
232
  this.minValidateFn = noop;
231
233
  this.maxValidateFn = noop;
234
+ this.changes = {};
235
+ this.valueSetter = false;
236
+ this.selectionSetter = false;
232
237
  this.syncNavigation = true;
233
238
  this._type = 'infinite';
234
239
  this.domEvents = [];
235
240
  this.resolvedPromise = Promise.resolve(null);
236
241
  this.destroyed = false;
242
+ this.canHover = false;
237
243
  validatePackage(packageMetadata);
238
244
  this.id = `kendo-calendarid-${this.bus.calendarId}`;
239
- this.setClasses(element.nativeElement);
240
245
  if (this.pickerService) {
241
246
  this.pickerService.calendar = this;
242
247
  }
@@ -320,29 +325,37 @@ export class CalendarComponent {
320
325
  get max() {
321
326
  return this._max;
322
327
  }
328
+ /**
329
+ * Sets the Calendar selection mode
330
+ * ([see example]({% slug multiple_selection_calendar %})).
331
+ *
332
+ * The available values are:
333
+ * * `single` (default)
334
+ * * `multiple`
335
+ * * `range`
336
+ */
337
+ set selection(_selection) {
338
+ this._selection = _selection;
339
+ this.selectionSetter = true;
340
+ }
341
+ get selection() {
342
+ return this._selection;
343
+ }
323
344
  /**
324
345
  * Sets or gets the `value` property of the Calendar and defines the selected value of the component.
325
346
  *
326
347
  * > The `value` has to be a valid
327
348
  * [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date)
328
- * instance when in `single` selection mode or an array of valid JavaScript Date instances when in `multiple` selection mode.
349
+ * instance when in `single` selection mode, an array of valid JavaScript Date instances when in `multiple` selection mode, or
350
+ * an object of type `SelectionRange` when in `range` selection mode.
329
351
  */
352
+ set value(candidate) {
353
+ this.valueSetter = true;
354
+ this._value = candidate;
355
+ }
330
356
  get value() {
331
357
  return this._value;
332
358
  }
333
- set value(candidate) {
334
- this.verifyValue(candidate);
335
- this._value = Array.isArray(candidate) ?
336
- candidate.filter(date => isPresent(date)).map(element => cloneDate(element)) :
337
- cloneDate(candidate);
338
- const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
339
- if (!areDatesEqual(selection, this.selectedDates)) {
340
- const lastSelected = last(selection);
341
- this.rangePivot = cloneDate(lastSelected);
342
- this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
343
- this.selectedDates = selection;
344
- }
345
- }
346
359
  /**
347
360
  * @hidden
348
361
  */
@@ -373,7 +386,9 @@ export class CalendarComponent {
373
386
  */
374
387
  set type(type) {
375
388
  this.renderer.removeClass(this.element.nativeElement, `k-calendar-${this.type}`);
376
- this.renderer.addClass(this.element.nativeElement, `k-calendar-${type}`);
389
+ if (type === 'infinite') {
390
+ this.renderer.addClass(this.element.nativeElement, `k-calendar-${type}`);
391
+ }
377
392
  this._type = type;
378
393
  }
379
394
  get type() {
@@ -512,17 +527,23 @@ export class CalendarComponent {
512
527
  *
513
528
  */
514
529
  set size(size) {
515
- const element = this.type === 'infinite' ? this.element : this.multiViewCalendar.element;
516
- this.renderer.removeClass(element.nativeElement, getSizeClass('calendar', this.size));
517
- const newSize = size ? size : DEFAULT_SIZE;
518
- if (newSize !== 'none') {
519
- this.renderer.addClass(element.nativeElement, getSizeClass('calendar', newSize));
520
- }
521
- this._size = newSize;
530
+ this._size = size;
522
531
  }
523
532
  get size() {
524
533
  return this._size;
525
534
  }
535
+ /**
536
+ * Specify, which end of the defined selection range should be marked as active.
537
+ *
538
+ * > Value will be ignored if the selection range is undefined.
539
+ * > If range selection is used then the default value is 'start'.
540
+ */
541
+ set activeRangeEnd(_activeRangeEnd) {
542
+ this._activeRangeEnd = _activeRangeEnd;
543
+ }
544
+ get activeRangeEnd() {
545
+ return this._activeRangeEnd;
546
+ }
526
547
  get activeViewEnum() {
527
548
  const activeView = CalendarViewEnum[this.activeView];
528
549
  return activeView < this.bottomViewEnum ? this.bottomViewEnum : activeView;
@@ -541,6 +562,7 @@ export class CalendarComponent {
541
562
  return this.type === 'classic' ? undefined : this.disabled;
542
563
  }
543
564
  ngOnInit() {
565
+ this.setClasses(this.element.nativeElement);
544
566
  if (this.type === 'infinite') {
545
567
  this.dom.calculateHeights(this.element.nativeElement);
546
568
  this.scrollSyncService.configure(this.activeViewEnum);
@@ -555,26 +577,42 @@ export class CalendarComponent {
555
577
  }
556
578
  }
557
579
  ngOnChanges(changes) {
580
+ this.changes = changes;
558
581
  this.verifyChanges();
559
582
  this.bus.configure(this.bottomViewEnum, this.topViewEnum);
560
583
  this.scrollSyncService.configure(this.activeViewEnum);
561
- if (hasExistingValue(changes, 'focusedDate')) {
562
- const focusedDate = changes.focusedDate.currentValue;
584
+ }
585
+ ngDoCheck() {
586
+ if (this.valueSetter || this.selectionSetter) {
587
+ if (this.selection === 'range' &&
588
+ (this.value?.start || this.value?.end) &&
589
+ this.focusedDate.getTime() !== this.value.start?.getTime() &&
590
+ this.focusedDate.getTime() !== this.value.end?.getTime()) {
591
+ this.focusedDate = this.value.start || this.value.end || getToday();
592
+ }
593
+ this.setValue(this.value);
594
+ this.valueSetter = false;
595
+ this.selectionSetter = false;
596
+ }
597
+ if (hasExistingValue(this.changes, 'focusedDate')) {
598
+ const focusedDate = this.changes.focusedDate.currentValue;
563
599
  this.focusedDate = dateInRange(focusedDate, this.min, this.max);
564
600
  }
565
- if (changes.navigation) {
601
+ if (this.changes.navigation) {
566
602
  this.syncNavigation = true;
567
603
  }
568
- if (changes.min || changes.max || changes.rangeValidation) {
604
+ if (this.changes.min || this.changes.max || this.changes.rangeValidation) {
569
605
  this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop;
570
606
  this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop;
571
607
  this.onValidatorChange();
572
608
  }
609
+ this.changes = {};
573
610
  }
574
611
  ngAfterViewInit() {
575
612
  this.setAriaActivedescendant();
576
613
  if (this.size !== 'none') {
577
614
  const element = this.type === 'infinite' ? this.element : this.multiViewCalendar.element;
615
+ this.renderer.removeClass(element.nativeElement, getSizeClass('calendar', this.size));
578
616
  this.renderer.addClass(element.nativeElement, getSizeClass('calendar', this.size));
579
617
  }
580
618
  }
@@ -602,6 +640,31 @@ export class CalendarComponent {
602
640
  }
603
641
  this.destroyed = true;
604
642
  }
643
+ /**
644
+ * @hidden
645
+ */
646
+ onCellEnter(date) {
647
+ if (this.selection === 'range' && this.canHover) {
648
+ this.ngZone.run(() => {
649
+ if (this.allowReverse) {
650
+ if (this.activeRangeEnd === 'end' && this.selectionRange.start) {
651
+ this.selectionRange = { start: this.selectionRange.start, end: date };
652
+ }
653
+ if (this.activeRangeEnd === 'start' && this.selectionRange.end) {
654
+ this.selectionRange = { start: date, end: this.selectionRange.end };
655
+ }
656
+ }
657
+ else {
658
+ if (this.activeRangeEnd === 'end' && this.selectionRange.start && date >= this.selectionRange.start) {
659
+ this.selectionRange = { start: this.selectionRange.start, end: date };
660
+ }
661
+ if (this.selectionRange.start && date < this.selectionRange.start) {
662
+ this.selectionRange = { start: this.selectionRange.start, end: null };
663
+ }
664
+ }
665
+ });
666
+ }
667
+ }
605
668
  /**
606
669
  * @hidden
607
670
  */
@@ -675,9 +738,14 @@ export class CalendarComponent {
675
738
  /**
676
739
  * @hidden
677
740
  */
678
- handleMultiViewCalendarValueChange(date, focusedDate) {
679
- const selectedDates = Array.isArray(date) ? date : [date];
680
- this.handleDateChange({ selectedDates, focusedDate });
741
+ handleMultiViewCalendarValueChange(value, focusedDate) {
742
+ if (this.selection === 'range') {
743
+ this.valueChange.emit(value);
744
+ }
745
+ else {
746
+ const selectedDates = (Array.isArray(value) ? value : [value]);
747
+ this.handleDateChange({ selectedDates, focusedDate });
748
+ }
681
749
  }
682
750
  /**
683
751
  * @hidden
@@ -701,6 +769,9 @@ export class CalendarComponent {
701
769
  if (this.disabledDatesService.isDateDisabled(this.focusedDate)) {
702
770
  return;
703
771
  }
772
+ if (this.selection === 'range') {
773
+ return;
774
+ }
704
775
  this.ngZone.run(() => {
705
776
  this.selectedDates = availableDates.map(date => cloneDate(date));
706
777
  this.value = this.parseSelectionToValue(availableDates);
@@ -813,8 +884,13 @@ export class CalendarComponent {
813
884
  */
814
885
  handleCellClick({ date, modifiers }) {
815
886
  this.focus();
816
- this.selectionService.lastClicked = date;
817
- this.performSelection(date, modifiers);
887
+ if (this.selection === 'range') {
888
+ this.performRangeSelection(date);
889
+ }
890
+ else {
891
+ this.selectionService.lastClicked = date;
892
+ this.performSelection(date, modifiers);
893
+ }
818
894
  }
819
895
  /**
820
896
  * @hidden
@@ -824,10 +900,22 @@ export class CalendarComponent {
824
900
  return;
825
901
  }
826
902
  this.ngZone.run(() => {
827
- this.handleDateChange({
828
- selectedDates: dates,
829
- focusedDate: last(dates)
830
- });
903
+ if (this.selection === 'multiple') {
904
+ this.handleDateChange({
905
+ selectedDates: dates,
906
+ focusedDate: last(dates),
907
+ });
908
+ }
909
+ if (this.selection === 'range') {
910
+ this.canHover = false;
911
+ this.activeRangeEnd = 'start';
912
+ const shouldEmitValueChange = this.selectionRange.start?.getTime() !== dates[0].getTime() ||
913
+ this.selectionRange.end?.getTime() !== last(dates).getTime();
914
+ this.value = { start: dates[0], end: last(dates) };
915
+ if (shouldEmitValueChange) {
916
+ this.valueChange.emit(this.value);
917
+ }
918
+ }
831
919
  });
832
920
  }
833
921
  /**
@@ -872,9 +960,11 @@ export class CalendarComponent {
872
960
  }
873
961
  }
874
962
  setClasses(element) {
875
- this.renderer.addClass(element, 'k-widget');
876
- this.renderer.addClass(element, 'k-calendar');
877
- this.renderer.addClass(element, `k-calendar-${this.type}`);
963
+ this.renderer.removeClass(element, `k-calendar-${this.type}`);
964
+ if (this.type === 'infinite') {
965
+ this.renderer.addClass(element, 'k-calendar');
966
+ this.renderer.addClass(element, `k-calendar-${this.type}`);
967
+ }
878
968
  }
879
969
  verifyChanges() {
880
970
  if (!isDevMode()) {
@@ -891,19 +981,35 @@ export class CalendarComponent {
891
981
  if (!isDevMode()) {
892
982
  return;
893
983
  }
894
- if (this.selection === 'single' && candidate && !(candidate instanceof Date)) {
895
- throw new Error(`The 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK} for possible resolution.`);
984
+ if (this.selection === 'single' && candidate && !(isNullOrDate(candidate))) {
985
+ throw new Error(`When using 'single' selection the 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK} for possible resolution.`);
896
986
  }
897
- else if (this.selection === 'multiple' && candidate && Array.isArray(candidate)) {
898
- const onlyDates = candidate.every(value => value instanceof Date);
899
- if (!onlyDates) {
900
- throw new Error(`The 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK} for possible resolution.`);
987
+ else if (this.selection === 'multiple' && candidate) {
988
+ if (Array.isArray(candidate)) {
989
+ const onlyDates = candidate.every(value => value instanceof Date);
990
+ if (!onlyDates) {
991
+ throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK} for possible resolution.`);
992
+ }
901
993
  }
994
+ if (Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
995
+ throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK} for possible resolution.`);
996
+ }
997
+ }
998
+ else if (this.selection === 'range' && candidate && !(isNullOrDate(candidate['start']) && isNullOrDate(candidate['end']))) {
999
+ throw new Error(`The 'value' should be an object with start and end dates. Check ${VALUE_DOC_LINK} for possible resolution.`);
902
1000
  }
903
1001
  }
904
1002
  bindEvents() {
905
1003
  const element = this.element.nativeElement;
906
- this.domEvents.push(this.renderer.listen(element, 'focus', this.handleFocus.bind(this)), this.renderer.listen(element, 'mousedown', preventDefault), this.renderer.listen(element, 'click', this.handleComponentClick.bind(this)), this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
1004
+ this.domEvents.push(this.renderer.listen(element, 'focus', this.handleFocus.bind(this)), this.renderer.listen(element, 'mousedown', preventDefault), this.renderer.listen(element, 'click', this.handleComponentClick.bind(this)), this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)), this.renderer.listen(element, 'mouseleave', this.setRangeSelectionToValue.bind(this)));
1005
+ }
1006
+ setRangeSelectionToValue() {
1007
+ if (this.selection === 'range' && this.value) {
1008
+ this.ngZone.run(() => {
1009
+ this.selectionRange = this.value;
1010
+ this.cdr.markForCheck();
1011
+ });
1012
+ }
907
1013
  }
908
1014
  emitBlur(args) {
909
1015
  if (this.pickerService) {
@@ -951,12 +1057,17 @@ export class CalendarComponent {
951
1057
  }
952
1058
  if (args.keyCode === Keys.Enter) {
953
1059
  this.selectionService.lastClicked = this.focusedDate;
954
- this.performSelection(this.focusedDate, args);
1060
+ if (this.selection !== 'range') {
1061
+ this.performSelection(this.focusedDate, args);
1062
+ }
1063
+ else {
1064
+ this.performRangeSelection(this.focusedDate);
1065
+ }
955
1066
  }
956
1067
  if (args.keyCode === Keys.KeyT) {
957
1068
  this.focusToday();
958
1069
  }
959
- if (isArrowWithShiftPressed(args)) {
1070
+ if (isArrowWithShiftPressed(args) && this.selection !== 'range') {
960
1071
  args.anyArrow = true;
961
1072
  this.performSelection(this.focusedDate, args);
962
1073
  }
@@ -995,6 +1106,71 @@ export class CalendarComponent {
995
1106
  selection = selection || [];
996
1107
  return this.selection === 'single' ? cloneDate(last(selection)) : selection.map(date => cloneDate(date));
997
1108
  }
1109
+ setValue(candidate) {
1110
+ this.verifyValue(candidate);
1111
+ if (candidate === null) {
1112
+ this._value = null;
1113
+ this.selectedDates = [];
1114
+ this.selectionRange = { start: null, end: null };
1115
+ }
1116
+ else if (Array.isArray(candidate)) {
1117
+ this.selectionRange = { start: null, end: null };
1118
+ this._value = candidate.filter(date => isPresent(date)).map(element => cloneDate(element));
1119
+ }
1120
+ else if (isObject(candidate) && Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
1121
+ this.selectedDates = [];
1122
+ this.selectionRange = { start: null, end: null };
1123
+ this._value = { start: null, end: null };
1124
+ this._value.start = candidate.start instanceof Date ? cloneDate(candidate.start) : null;
1125
+ this._value.end = candidate.end instanceof Date ? cloneDate(candidate.end) : null;
1126
+ this.selectionRange = Object.assign({}, this._value);
1127
+ if (this._value?.start && !this._value?.end) {
1128
+ this.activeRangeEnd = 'end';
1129
+ this.canHover = true;
1130
+ }
1131
+ if (this._value?.end && !this._value?.start) {
1132
+ this.activeRangeEnd = 'start';
1133
+ this.canHover = true;
1134
+ }
1135
+ if (this._value?.end && this._value?.start) {
1136
+ this.canHover = false;
1137
+ }
1138
+ }
1139
+ else {
1140
+ this.selectionRange = { start: null, end: null };
1141
+ this._value = cloneDate(candidate);
1142
+ }
1143
+ if (this.selection !== 'range') {
1144
+ const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
1145
+ if (!areDatesEqual(selection, this.selectedDates)) {
1146
+ const lastSelected = last(selection);
1147
+ this.rangePivot = cloneDate(lastSelected);
1148
+ this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
1149
+ this.selectedDates = selection;
1150
+ }
1151
+ }
1152
+ }
1153
+ performRangeSelection(date) {
1154
+ this.focusedDate = date;
1155
+ const clonedRangeSelection = Object.assign({}, this.selectionRange);
1156
+ const emitValueChange = (this.activeRangeEnd === 'start' && this.value?.start?.getTime() !== date?.getTime()) ||
1157
+ (this.activeRangeEnd === 'end' && this.value?.end?.getTime() !== date?.getTime());
1158
+ this.ngZone.run(() => {
1159
+ const rangeSelection = handleRangeSelection(date, clonedRangeSelection, this.activeRangeEnd, this.allowReverse);
1160
+ this.activeRangeEnd = rangeSelection.activeRangeEnd;
1161
+ if (this.canHover && rangeSelection.activeRangeEnd === 'end' && rangeSelection.selectionRange.end?.getTime() === date.getTime()) {
1162
+ this.activeRangeEnd = 'start';
1163
+ rangeSelection.activeRangeEnd = 'start';
1164
+ }
1165
+ this.canHover = this.activeRangeEnd === 'end' && rangeSelection.selectionRange.start && !rangeSelection.selectionRange.end;
1166
+ if (emitValueChange && (this.value?.start?.getTime() !== rangeSelection.selectionRange?.start?.getTime() ||
1167
+ this.value?.end?.getTime() !== rangeSelection.selectionRange?.end?.getTime())) {
1168
+ this.value = rangeSelection.selectionRange;
1169
+ this.valueChange.emit(this.value);
1170
+ }
1171
+ this.cdr.markForCheck();
1172
+ });
1173
+ }
998
1174
  performSelection(date, selectionModifiers) {
999
1175
  const selection = this.selectionService.performSelection({
1000
1176
  date: date,
@@ -1011,8 +1187,8 @@ export class CalendarComponent {
1011
1187
  });
1012
1188
  }
1013
1189
  }
1014
- CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", 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 });
1015
- CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CalendarComponent, selector: "kendo-calendar", inputs: { showOtherMonthDays: "showOtherMonthDays", id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", weekDaysFormat: "weekDaysFormat", footer: "footer", 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"], headerTemplateRef: ["headerTemplate", "headerTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"], size: "size" }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", activeViewDateChange: "activeViewDateChange", onBlur: "blur", onFocus: "focus", 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: [
1190
+ CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", 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 });
1191
+ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CalendarComponent, selector: "kendo-calendar", inputs: { showOtherMonthDays: "showOtherMonthDays", id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", weekDaysFormat: "weekDaysFormat", footer: "footer", selection: "selection", allowReverse: "allowReverse", 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"], headerTemplateRef: ["headerTemplate", "headerTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"], size: "size", activeRangeEnd: "activeRangeEnd" }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", activeViewDateChange: "activeViewDateChange", onBlur: "blur", onFocus: "focus", 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: [
1016
1192
  BusViewService,
1017
1193
  CALENDAR_VALUE_ACCESSOR,
1018
1194
  CALENDAR_RANGE_VALIDATORS,
@@ -1055,7 +1231,11 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
1055
1231
  </kendo-calendar-navigation>
1056
1232
  <kendo-calendar-viewlist
1057
1233
  [activeView]="activeViewEnum"
1234
+ [allowReverse]="allowReverse"
1058
1235
  [showOtherMonthDays]="showOtherMonthDays"
1236
+ [activeRangeEnd]="activeRangeEnd"
1237
+ [selectionRange]="selectionRange"
1238
+ [size]="size"
1059
1239
  [isActive]="isActive"
1060
1240
  [id]="headerId"
1061
1241
  [weekDaysFormat]="weekDaysFormat"
@@ -1083,6 +1263,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
1083
1263
  (pageChange)="onPageChange()"
1084
1264
  (focusCalendar)="handleFocus()"
1085
1265
  (blurCalendar)="handleBlur($event)"
1266
+ (cellEnter)="onCellEnter($event)"
1086
1267
  >
1087
1268
  </kendo-calendar-viewlist>
1088
1269
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
@@ -1093,7 +1274,11 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
1093
1274
  [views]="1"
1094
1275
  [min]="min"
1095
1276
  [max]="max"
1277
+ [size]="size"
1096
1278
  [id]="id"
1279
+ [activeRangeEnd]="activeRangeEnd"
1280
+ [selectionRange]="selectionRange"
1281
+ [allowReverse]="allowReverse"
1097
1282
  [disabled]="disabled"
1098
1283
  [isActive]="isActive"
1099
1284
  [showOtherMonthDays]="showOtherMonthDays"
@@ -1135,8 +1320,8 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
1135
1320
  </kendo-multiviewcalendar-messages>
1136
1321
  </kendo-multiviewcalendar>
1137
1322
  </ng-container>
1138
- `, isInline: true, dependencies: [{ kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i10.MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }, { kind: "component", type: i11.MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["showOtherMonthDays", "showCalendarHeader", "id", "focusedDate", "footer", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "weekDaysFormat", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "footerTemplate", "headerTitleTemplate", "headerTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur", "focus", "focusCalendar", "onClosePopup", "onTabPress", "onShiftTabPress"], exportAs: ["kendo-multiviewcalendar"] }, { kind: "component", type: i12.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: i13.NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { kind: "directive", type: i14.CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { kind: "component", type: i15.ViewListComponent, selector: "kendo-calendar-viewlist", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "headerTitleTemplateRef", "headerTemplateRef", "footerTemplateRef", "showOtherMonthDays", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectedDates", "tabIndex", "disabled", "id", "showFooter", "weekDaysFormat", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1139
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarComponent, decorators: [{
1323
+ `, isInline: true, dependencies: [{ kind: "directive", type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i10.MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }, { kind: "component", type: i11.MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["showOtherMonthDays", "showCalendarHeader", "size", "id", "focusedDate", "footer", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "allowReverse", "value", "disabled", "tabindex", "tabIndex", "weekDaysFormat", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "footerTemplate", "headerTitleTemplate", "headerTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "rangeSelectionChange", "blur", "focus", "focusCalendar", "onClosePopup", "onTabPress", "onShiftTabPress"], exportAs: ["kendo-multiviewcalendar"] }, { kind: "component", type: i12.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: i13.NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { kind: "directive", type: i14.CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { kind: "component", type: i15.ViewListComponent, selector: "kendo-calendar-viewlist", inputs: ["allowReverse", "cellTemplateRef", "weekNumberTemplateRef", "headerTitleTemplateRef", "headerTemplateRef", "footerTemplateRef", "showOtherMonthDays", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectedDates", "tabIndex", "disabled", "id", "showFooter", "weekDaysFormat", "activeRangeEnd", "selectionRange", "size", "weekNumber"], outputs: ["cellEnter", "cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CalendarComponent, decorators: [{
1140
1325
  type: Component,
1141
1326
  args: [{
1142
1327
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -1186,7 +1371,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
1186
1371
  </kendo-calendar-navigation>
1187
1372
  <kendo-calendar-viewlist
1188
1373
  [activeView]="activeViewEnum"
1374
+ [allowReverse]="allowReverse"
1189
1375
  [showOtherMonthDays]="showOtherMonthDays"
1376
+ [activeRangeEnd]="activeRangeEnd"
1377
+ [selectionRange]="selectionRange"
1378
+ [size]="size"
1190
1379
  [isActive]="isActive"
1191
1380
  [id]="headerId"
1192
1381
  [weekDaysFormat]="weekDaysFormat"
@@ -1214,6 +1403,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
1214
1403
  (pageChange)="onPageChange()"
1215
1404
  (focusCalendar)="handleFocus()"
1216
1405
  (blurCalendar)="handleBlur($event)"
1406
+ (cellEnter)="onCellEnter($event)"
1217
1407
  >
1218
1408
  </kendo-calendar-viewlist>
1219
1409
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
@@ -1224,7 +1414,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
1224
1414
  [views]="1"
1225
1415
  [min]="min"
1226
1416
  [max]="max"
1417
+ [size]="size"
1227
1418
  [id]="id"
1419
+ [activeRangeEnd]="activeRangeEnd"
1420
+ [selectionRange]="selectionRange"
1421
+ [allowReverse]="allowReverse"
1228
1422
  [disabled]="disabled"
1229
1423
  [isActive]="isActive"
1230
1424
  [showOtherMonthDays]="showOtherMonthDays"
@@ -1288,6 +1482,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
1288
1482
  type: Input
1289
1483
  }], selection: [{
1290
1484
  type: Input
1485
+ }], allowReverse: [{
1486
+ type: Input
1291
1487
  }], value: [{
1292
1488
  type: Input
1293
1489
  }], disabled: [{
@@ -1391,6 +1587,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
1391
1587
  args: ['navigationItemTemplate']
1392
1588
  }], size: [{
1393
1589
  type: Input
1590
+ }], activeRangeEnd: [{
1591
+ type: Input
1394
1592
  }], navigationView: [{
1395
1593
  type: ViewChild,
1396
1594
  args: [NavigationComponent, { static: false }]
@@ -64,8 +64,8 @@ import * as i0 from "@angular/core";
64
64
  */
65
65
  export class CalendarModule {
66
66
  }
67
- CalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
68
- CalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: CalendarModule, declarations: [CalendarComponent,
67
+ CalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
68
+ CalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CalendarModule, declarations: [CalendarComponent,
69
69
  NavigationComponent,
70
70
  CalendarCustomMessagesComponent,
71
71
  CalendarLocalizedMessagesDirective,
@@ -83,7 +83,7 @@ CalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
83
83
  ViewListComponent,
84
84
  CalendarCommonModule,
85
85
  TemplatesModule] });
86
- CalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarModule, providers: [
86
+ CalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CalendarModule, providers: [
87
87
  CalendarDOMService,
88
88
  CenturyViewService,
89
89
  DecadeViewService,
@@ -99,7 +99,7 @@ CalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
99
99
  EventsModule,
100
100
  ResizeSensorModule, CalendarCommonModule,
101
101
  TemplatesModule] });
102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarModule, decorators: [{
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CalendarModule, decorators: [{
103
103
  type: NgModule,
104
104
  args: [{
105
105
  declarations: [
@@ -42,14 +42,14 @@ import * as i0 from "@angular/core";
42
42
  */
43
43
  export class CalendarsModule {
44
44
  }
45
- CalendarsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
46
- CalendarsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: CalendarsModule, imports: [CalendarModule,
45
+ CalendarsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CalendarsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
46
+ CalendarsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: CalendarsModule, imports: [CalendarModule,
47
47
  MultiViewCalendarModule], exports: [CalendarModule,
48
48
  MultiViewCalendarModule] });
49
- CalendarsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarsModule, imports: [CalendarModule,
49
+ CalendarsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CalendarsModule, imports: [CalendarModule,
50
50
  MultiViewCalendarModule, CalendarModule,
51
51
  MultiViewCalendarModule] });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarsModule, decorators: [{
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CalendarsModule, decorators: [{
53
53
  type: NgModule,
54
54
  args: [{
55
55
  exports: [