@progress/kendo-angular-dateinputs 16.0.0-develop.11 → 16.0.0-develop.13

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 (29) hide show
  1. package/calendar/calendar.component.d.ts +42 -8
  2. package/calendar/horizontal-view-list.component.d.ts +4 -3
  3. package/calendar/models/cell-context.interface.d.ts +4 -0
  4. package/calendar/models/selection-range.interface.d.ts +2 -2
  5. package/calendar/models/selection.d.ts +11 -1
  6. package/calendar/multiview-calendar.component.d.ts +40 -8
  7. package/calendar/view-list.component.d.ts +7 -1
  8. package/calendar/view.component.d.ts +2 -1
  9. package/common/utils.d.ts +4 -0
  10. package/daterange/date-range-popup.component.d.ts +15 -2
  11. package/esm2020/calendar/calendar.component.mjs +233 -45
  12. package/esm2020/calendar/horizontal-view-list.component.mjs +9 -5
  13. package/esm2020/calendar/models/selection.mjs +34 -1
  14. package/esm2020/calendar/multiview-calendar.component.mjs +226 -45
  15. package/esm2020/calendar/services/century-view.service.mjs +26 -5
  16. package/esm2020/calendar/services/decade-view.service.mjs +26 -5
  17. package/esm2020/calendar/services/month-view.service.mjs +26 -5
  18. package/esm2020/calendar/services/year-view.service.mjs +26 -5
  19. package/esm2020/calendar/view-list.component.mjs +20 -3
  20. package/esm2020/calendar/view.component.mjs +6 -3
  21. package/esm2020/common/utils.mjs +4 -0
  22. package/esm2020/datepicker/datepicker.component.mjs +1 -1
  23. package/esm2020/daterange/date-range-popup.component.mjs +64 -11
  24. package/esm2020/daterange/date-range.component.mjs +1 -1
  25. package/esm2020/datetimepicker/datetimepicker.component.mjs +1 -1
  26. package/esm2020/package-metadata.mjs +2 -2
  27. package/fesm2015/progress-kendo-angular-dateinputs.mjs +710 -132
  28. package/fesm2020/progress-kendo-angular-dateinputs.mjs +700 -132
  29. package/package.json +8 -8
@@ -9,7 +9,7 @@ import * as i1$1 from '@progress/kendo-angular-l10n';
9
9
  import { ComponentMessages, LocalizationService, L10N_PREFIX, RTL } from '@progress/kendo-angular-l10n';
10
10
  import { cloneDate, MS_PER_HOUR, MS_PER_MINUTE, addDays, getDate, isEqual, addDecades, addCenturies, firstDecadeOfCentury, lastDecadeOfCentury, firstYearOfDecade, createDate, lastYearOfDecade, lastMonthOfYear, lastDayOfMonth, durationInCenturies, addYears, durationInDecades, addWeeks, addMonths, firstDayOfMonth, dayOfWeek, durationInMonths, firstMonthOfYear, durationInYears, weekInYear } from '@progress/kendo-date-math';
11
11
  import * as i12 from '@progress/kendo-angular-common';
12
- import { isDocumentAvailable, guid, Keys as Keys$1, hasObservers, KendoInput, isObjectPresent, removeHTMLAttributes, parseAttributes, isControlRequired, setHTMLAttributes, EventsModule, ResizeSensorModule, ToggleButtonTabStopModule } from '@progress/kendo-angular-common';
12
+ import { isDocumentAvailable, guid, Keys as Keys$1, hasObservers, isObject, KendoInput, isObjectPresent, removeHTMLAttributes, parseAttributes, isControlRequired, setHTMLAttributes, EventsModule, ResizeSensorModule, ToggleButtonTabStopModule } from '@progress/kendo-angular-common';
13
13
  export { ToggleButtonTabStopDirective } from '@progress/kendo-angular-common';
14
14
  import { validatePackage } from '@progress/kendo-licensing';
15
15
  import * as i1 from '@progress/kendo-angular-intl';
@@ -38,8 +38,8 @@ const packageMetadata = {
38
38
  name: '@progress/kendo-angular-dateinputs',
39
39
  productName: 'Kendo UI for Angular',
40
40
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
41
- publishDate: 1714403586,
42
- version: '16.0.0-develop.11',
41
+ publishDate: 1715097775,
42
+ version: '16.0.0-develop.13',
43
43
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
44
44
  };
45
45
 
@@ -103,6 +103,10 @@ const currentFocusTarget = (blurArgs) => blurArgs.relatedTarget || document.acti
103
103
  * @hidden
104
104
  */
105
105
  const isPresent = (value) => value !== undefined && value !== null;
106
+ /**
107
+ * @hidden
108
+ */
109
+ const isNullOrDate = (value) => value === null || value instanceof Date;
106
110
  /**
107
111
  * @hidden
108
112
  */
@@ -630,7 +634,7 @@ class CenturyViewService {
630
634
  return range(0, count).map(i => addCenturies(start, i));
631
635
  }
632
636
  data(options) {
633
- const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate } = options;
637
+ const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, allowReverse } = options;
634
638
  if (!viewDate) {
635
639
  return EMPTY_DATA$3;
636
640
  }
@@ -646,10 +650,30 @@ class CenturyViewService {
646
650
  if (!this.isInRange(cellDate, min, max) || nextCentury) {
647
651
  return null;
648
652
  }
649
- const isRangeStart = this.isEqual(cellDate, selectionRange.start);
650
- const isRangeEnd = this.isEqual(cellDate, selectionRange.end);
653
+ let isRangeStart = false;
654
+ let isRangeEnd = false;
655
+ if (allowReverse) {
656
+ if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
657
+ (this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
658
+ isRangeStart = true;
659
+ }
660
+ if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
661
+ (this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
662
+ isRangeEnd = true;
663
+ }
664
+ }
665
+ else {
666
+ isRangeStart = this.isEqual(cellDate, selectionRange.start);
667
+ isRangeEnd = this.isEqual(cellDate, selectionRange.end);
668
+ }
651
669
  const isInMiddle = !isRangeStart && !isRangeEnd;
652
- const isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
670
+ let isRangeMid;
671
+ if (allowReverse) {
672
+ isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
673
+ }
674
+ else {
675
+ isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
676
+ }
653
677
  return {
654
678
  formattedValue: this.value(cellDate),
655
679
  id: `${cellUID}${cellDate.getTime()}`,
@@ -663,7 +687,8 @@ class CenturyViewService {
663
687
  isRangeSplitStart: isRangeMid && this.isEqual(cellDate, firstDate),
664
688
  isToday: this.isEqual(cellDate, today),
665
689
  title: this.cellTitle(cellDate),
666
- value: cellDate
690
+ value: cellDate,
691
+ allowReverse: allowReverse
667
692
  };
668
693
  });
669
694
  });
@@ -816,7 +841,7 @@ class DecadeViewService {
816
841
  return range(0, count).map(i => addDecades(start, i));
817
842
  }
818
843
  data(options) {
819
- const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate } = options;
844
+ const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, allowReverse } = options;
820
845
  if (!viewDate) {
821
846
  return EMPTY_DATA$2;
822
847
  }
@@ -832,10 +857,30 @@ class DecadeViewService {
832
857
  if (!this.isInRange(cellDate, min, max) || nextDecade) {
833
858
  return null;
834
859
  }
835
- const isRangeStart = this.isEqual(cellDate, selectionRange.start);
836
- const isRangeEnd = this.isEqual(cellDate, selectionRange.end);
860
+ let isRangeStart = false;
861
+ let isRangeEnd = false;
862
+ if (allowReverse) {
863
+ if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
864
+ (this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
865
+ isRangeStart = true;
866
+ }
867
+ if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
868
+ (this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
869
+ isRangeEnd = true;
870
+ }
871
+ }
872
+ else {
873
+ isRangeStart = this.isEqual(cellDate, selectionRange.start);
874
+ isRangeEnd = this.isEqual(cellDate, selectionRange.end);
875
+ }
837
876
  const isInMiddle = !isRangeStart && !isRangeEnd;
838
- const isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
877
+ let isRangeMid;
878
+ if (allowReverse) {
879
+ isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
880
+ }
881
+ else {
882
+ isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
883
+ }
839
884
  return {
840
885
  formattedValue: this.value(cellDate),
841
886
  id: `${cellUID}${cellDate.getTime()}`,
@@ -849,7 +894,8 @@ class DecadeViewService {
849
894
  isRangeSplitStart: isRangeMid && this.isEqual(cellDate, firstDate),
850
895
  isToday: this.isEqual(cellDate, today),
851
896
  title: this.cellTitle(cellDate),
852
- value: cellDate
897
+ value: cellDate,
898
+ allowReverse: allowReverse
853
899
  };
854
900
  });
855
901
  });
@@ -982,7 +1028,7 @@ class MonthViewService {
982
1028
  return range(0, count).map(i => addMonths(start, i));
983
1029
  }
984
1030
  data(options) {
985
- const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, isDateDisabled = () => false } = options;
1031
+ const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, isDateDisabled = () => false, allowReverse } = options;
986
1032
  if (!viewDate) {
987
1033
  return EMPTY_DATA$1;
988
1034
  }
@@ -1004,10 +1050,30 @@ class MonthViewService {
1004
1050
  if (outOfRange) {
1005
1051
  return null;
1006
1052
  }
1007
- const isRangeStart = this.isEqual(cellDate, selectionRange.start);
1008
- const isRangeEnd = this.isEqual(cellDate, selectionRange.end);
1053
+ let isRangeStart = false;
1054
+ let isRangeEnd = false;
1055
+ if (allowReverse) {
1056
+ if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
1057
+ (this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
1058
+ isRangeStart = true;
1059
+ }
1060
+ if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
1061
+ (this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
1062
+ isRangeEnd = true;
1063
+ }
1064
+ }
1065
+ else {
1066
+ isRangeStart = this.isEqual(cellDate, selectionRange.start);
1067
+ isRangeEnd = this.isEqual(cellDate, selectionRange.end);
1068
+ }
1009
1069
  const isInMiddle = !isRangeStart && !isRangeEnd;
1010
- const isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
1070
+ let isRangeMid;
1071
+ if (allowReverse) {
1072
+ isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
1073
+ }
1074
+ else {
1075
+ isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
1076
+ }
1011
1077
  return {
1012
1078
  formattedValue: this.value(cellDate),
1013
1079
  id: `${cellUID}${otherMonth ? cellDate.getTime() + '1' : cellDate.getTime()}`,
@@ -1023,7 +1089,8 @@ class MonthViewService {
1023
1089
  title: this.cellTitle(cellDate),
1024
1090
  value: cellDate,
1025
1091
  isDisabled: isDateDisabled(cellDate),
1026
- isOtherMonth: otherMonth
1092
+ isOtherMonth: otherMonth,
1093
+ allowReverse: allowReverse
1027
1094
  };
1028
1095
  });
1029
1096
  });
@@ -1168,7 +1235,7 @@ class YearViewService {
1168
1235
  return range(0, count).map(i => addYears(start, i));
1169
1236
  }
1170
1237
  data(options) {
1171
- const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate } = options;
1238
+ const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, allowReverse } = options;
1172
1239
  if (!viewDate) {
1173
1240
  return EMPTY_DATA;
1174
1241
  }
@@ -1186,10 +1253,30 @@ class YearViewService {
1186
1253
  if (!this.isInRange(cellDate, min, max) || changedYear) {
1187
1254
  return null;
1188
1255
  }
1189
- const isRangeStart = this.isEqual(cellDate, selectionRange.start);
1190
- const isRangeEnd = this.isEqual(cellDate, selectionRange.end);
1256
+ let isRangeStart = false;
1257
+ let isRangeEnd = false;
1258
+ if (allowReverse) {
1259
+ if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
1260
+ (this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
1261
+ isRangeStart = true;
1262
+ }
1263
+ if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
1264
+ (this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
1265
+ isRangeEnd = true;
1266
+ }
1267
+ }
1268
+ else {
1269
+ isRangeStart = this.isEqual(cellDate, selectionRange.start);
1270
+ isRangeEnd = this.isEqual(cellDate, selectionRange.end);
1271
+ }
1191
1272
  const isInMiddle = !isRangeStart && !isRangeEnd;
1192
- const isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
1273
+ let isRangeMid;
1274
+ if (allowReverse) {
1275
+ isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
1276
+ }
1277
+ else {
1278
+ isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
1279
+ }
1193
1280
  return {
1194
1281
  formattedValue: months[cellDate.getMonth()],
1195
1282
  id: `${cellUID}${cellDate.getTime()}`,
@@ -1203,7 +1290,8 @@ class YearViewService {
1203
1290
  isRangeSplitStart: isRangeMid && this.isEqual(cellDate, firstDate),
1204
1291
  isToday: this.isEqual(cellDate, today),
1205
1292
  title: this.cellTitle(cellDate),
1206
- value: cellDate
1293
+ value: cellDate,
1294
+ allowReverse: allowReverse
1207
1295
  };
1208
1296
  });
1209
1297
  });
@@ -1727,7 +1815,8 @@ class ViewComponent {
1727
1815
  selectionRange: this.selectionRange,
1728
1816
  viewDate: viewDate,
1729
1817
  isDateDisabled: this.disabledDatesService.isDateDisabled,
1730
- direction: this.direction
1818
+ direction: this.direction,
1819
+ allowReverse: this.allowReverse
1731
1820
  });
1732
1821
  }
1733
1822
  intlChange() {
@@ -1793,7 +1882,7 @@ class ViewComponent {
1793
1882
  }
1794
1883
  }
1795
1884
  ViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ViewComponent, deps: [{ token: BusViewService }, { token: i1.IntlService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: DisabledDatesService }], target: i0.ɵɵFactoryTarget.Component });
1796
- ViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ViewComponent, selector: "[kendoCalendarView]", inputs: { showOtherMonthDays: "showOtherMonthDays", direction: "direction", isActive: "isActive", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", viewDate: "viewDate", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", min: "min", max: "max", selectedDates: "selectedDates", weekNumber: "weekNumber", viewIndex: "viewIndex", templateRef: "templateRef", weekNumberTemplateRef: "weekNumberTemplateRef", headerTitle: "headerTitle" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", focusedCellId: "focusedCellId" }, usesOnChanges: true, ngImport: i0, template: `
1885
+ ViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ViewComponent, selector: "[kendoCalendarView]", inputs: { allowReverse: "allowReverse", showOtherMonthDays: "showOtherMonthDays", direction: "direction", isActive: "isActive", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", viewDate: "viewDate", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", min: "min", max: "max", selectedDates: "selectedDates", weekNumber: "weekNumber", viewIndex: "viewIndex", templateRef: "templateRef", weekNumberTemplateRef: "weekNumberTemplateRef", headerTitle: "headerTitle" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", focusedCellId: "focusedCellId" }, usesOnChanges: true, ngImport: i0, template: `
1797
1886
  <ng-template #emptyCell><td class="k-empty k-calendar-td" role="gridcell">&nbsp;</td></ng-template>
1798
1887
  <tr *ngIf="!isHorizontal()" class="k-calendar-tr" role="row" [attr.aria-hidden]="ariaHidden"><th class="k-calendar-caption" scope="col" [colSpan]="colSpan">{{title}}</th></tr>
1799
1888
  <tr *kFor="let row of data; let rowIndex = index" class="k-calendar-tr" role="row">
@@ -1895,7 +1984,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
1895
1984
  </tr>
1896
1985
  `
1897
1986
  }]
1898
- }], ctorParameters: function () { return [{ type: BusViewService }, { type: i1.IntlService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: DisabledDatesService }]; }, propDecorators: { showOtherMonthDays: [{
1987
+ }], ctorParameters: function () { return [{ type: BusViewService }, { type: i1.IntlService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: DisabledDatesService }]; }, propDecorators: { allowReverse: [{
1988
+ type: Input
1989
+ }], showOtherMonthDays: [{
1899
1990
  type: Input
1900
1991
  }], direction: [{
1901
1992
  type: Input
@@ -2202,7 +2293,7 @@ class HorizontalViewListComponent {
2202
2293
  }
2203
2294
  }
2204
2295
  HorizontalViewListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HorizontalViewListComponent, deps: [{ token: BusViewService }, { token: i1.IntlService }, { token: WeekNamesService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2205
- HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: { showOtherMonthDays: "showOtherMonthDays", cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", activeRangeEnd: "activeRangeEnd", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectionRange: "selectionRange", selectedDates: "selectedDates", views: "views", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", orientation: "orientation", activeDescendant: "activeDescendant", tabIndex: "tabIndex", disabled: "disabled", id: "id", weekDaysFormat: "weekDaysFormat", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", activeDateChange: "activeDateChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { listeners: { "focus": "handleMultiViewCalendarFocus()", "blur": "handleMultiViewCalendarBlur($event)" }, properties: { "class.k-calendar-view": "this.getComponentClass", "class.k-align-items-start": "this.getComponentClass", "class.k-justify-content-center": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass", "attr.role": "this.role", "attr.tabindex": "this.tabindex" } }, usesOnChanges: true, ngImport: i0, template: `
2296
+ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: { showOtherMonthDays: "showOtherMonthDays", cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", allowReverse: "allowReverse", activeRangeEnd: "activeRangeEnd", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectionRange: "selectionRange", selectedDates: "selectedDates", views: "views", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", orientation: "orientation", activeDescendant: "activeDescendant", tabIndex: "tabIndex", disabled: "disabled", id: "id", weekDaysFormat: "weekDaysFormat", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", activeDateChange: "activeDateChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { listeners: { "focus": "handleMultiViewCalendarFocus()", "blur": "handleMultiViewCalendarBlur($event)" }, properties: { "class.k-calendar-view": "this.getComponentClass", "class.k-align-items-start": "this.getComponentClass", "class.k-justify-content-center": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass", "attr.role": "this.role", "attr.tabindex": "this.tabindex" } }, usesOnChanges: true, ngImport: i0, template: `
2206
2297
  <ng-template #tableTemplate let-date="date" let-class="className">
2207
2298
  <table
2208
2299
  [attr.role]="views >= 2 ? 'none' : 'grid'"
@@ -2228,6 +2319,7 @@ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
2228
2319
  <tbody
2229
2320
  class="k-calendar-tbody"
2230
2321
  kendoCalendarView
2322
+ [allowReverse]="allowReverse"
2231
2323
  [showOtherMonthDays]="showOtherMonthDays"
2232
2324
  role="rowgroup"
2233
2325
  direction="horizontal"
@@ -2284,7 +2376,7 @@ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
2284
2376
  }"
2285
2377
  >
2286
2378
  </ng-template>
2287
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }, { kind: "component", type: ViewComponent, selector: "[kendoCalendarView]", inputs: ["showOtherMonthDays", "direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef", "headerTitle"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "focusedCellId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2379
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }, { kind: "component", type: ViewComponent, selector: "[kendoCalendarView]", inputs: ["allowReverse", "showOtherMonthDays", "direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef", "headerTitle"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "focusedCellId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2288
2380
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: HorizontalViewListComponent, decorators: [{
2289
2381
  type: Component,
2290
2382
  args: [{
@@ -2316,6 +2408,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2316
2408
  <tbody
2317
2409
  class="k-calendar-tbody"
2318
2410
  kendoCalendarView
2411
+ [allowReverse]="allowReverse"
2319
2412
  [showOtherMonthDays]="showOtherMonthDays"
2320
2413
  role="rowgroup"
2321
2414
  direction="horizontal"
@@ -2374,18 +2467,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
2374
2467
  </ng-template>
2375
2468
  `
2376
2469
  }]
2377
- }], ctorParameters: function () { return [{ type: BusViewService }, { type: i1.IntlService }, { type: WeekNamesService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { showOtherMonthDays: [{
2378
- type: Input
2379
- }], handleMultiViewCalendarFocus: [{
2470
+ }], ctorParameters: function () { return [{ type: BusViewService }, { type: i1.IntlService }, { type: WeekNamesService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { handleMultiViewCalendarFocus: [{
2380
2471
  type: HostListener,
2381
2472
  args: ["focus"]
2382
2473
  }], handleMultiViewCalendarBlur: [{
2383
2474
  type: HostListener,
2384
2475
  args: ["blur", ['$event']]
2476
+ }], showOtherMonthDays: [{
2477
+ type: Input
2385
2478
  }], cellTemplateRef: [{
2386
2479
  type: Input
2387
2480
  }], weekNumberTemplateRef: [{
2388
2481
  type: Input
2482
+ }], allowReverse: [{
2483
+ type: Input
2389
2484
  }], activeRangeEnd: [{
2390
2485
  type: Input
2391
2486
  }], activeView: [{
@@ -3101,6 +3196,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
3101
3196
  }]
3102
3197
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
3103
3198
 
3199
+ /**
3200
+ * @hidden
3201
+ */
3202
+ function handleRangeSelection(date, selectionRange, activeRangeEnd, allowReverse = false) {
3203
+ if ((activeRangeEnd === 'start' && selectionRange.start?.getTime() === date?.getTime() && ((allowReverse && !selectionRange.end) || !allowReverse)) ||
3204
+ (activeRangeEnd === 'end' && selectionRange.end?.getTime() === date?.getTime())) {
3205
+ return { activeRangeEnd: activeRangeEnd, selectionRange: selectionRange };
3206
+ }
3207
+ if (allowReverse) {
3208
+ if (activeRangeEnd === 'start') {
3209
+ selectionRange.start = date;
3210
+ activeRangeEnd = 'end';
3211
+ }
3212
+ else if (activeRangeEnd === 'end') {
3213
+ selectionRange.end = date;
3214
+ activeRangeEnd = 'start';
3215
+ }
3216
+ }
3217
+ if (!allowReverse) {
3218
+ if (activeRangeEnd === 'start' && date > selectionRange.end ||
3219
+ activeRangeEnd === 'end' && date < selectionRange.start) {
3220
+ selectionRange = { start: date, end: null };
3221
+ }
3222
+ else if (activeRangeEnd === 'start' && date <= selectionRange.end) {
3223
+ selectionRange.start = date;
3224
+ activeRangeEnd = 'end';
3225
+ }
3226
+ else if (activeRangeEnd === 'end' && date >= selectionRange.start) {
3227
+ selectionRange.end = date;
3228
+ activeRangeEnd = 'start';
3229
+ }
3230
+ }
3231
+ return { activeRangeEnd: activeRangeEnd, selectionRange: selectionRange };
3232
+ }
3233
+
3104
3234
  /**
3105
3235
  * @hidden
3106
3236
  */
@@ -3462,15 +3592,14 @@ class MultiViewCalendarComponent {
3462
3592
  * ([see example]({% slug disabled_dates_multiviewcalendar %}#toc-validation)).
3463
3593
  */
3464
3594
  this.disabledDatesRangeValidation = false;
3595
+ this._selection = 'single';
3465
3596
  /**
3466
- * Sets the Calendar selection mode
3467
- * ([see example]({% slug multiple_selection_multiviewcalendar %})).
3597
+ * Allows reverse selection when using `range` selection.
3598
+ * If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
3468
3599
  *
3469
- * The available values are:
3470
- * * `single` (default)
3471
- * * `multiple`
3600
+ * @default false
3472
3601
  */
3473
- this.selection = 'single';
3602
+ this.allowReverse = false;
3474
3603
  /**
3475
3604
  * Sets or gets the `disabled` property of the Calendar and
3476
3605
  * determines whether the component is active
@@ -3565,6 +3694,11 @@ class MultiViewCalendarComponent {
3565
3694
  * ([see example](slug:events_multiviewcalendar)).
3566
3695
  */
3567
3696
  this.valueChange = new EventEmitter();
3697
+ /**
3698
+ * @hidden
3699
+ * Fires when the range selection changes.
3700
+ */
3701
+ this.rangeSelectionChange = new EventEmitter();
3568
3702
  /**
3569
3703
  * Fires each time the MultiViewCalendar gets blurred
3570
3704
  * ([see example](slug:events_multiviewcalendar)).
@@ -3598,9 +3732,15 @@ class MultiViewCalendarComponent {
3598
3732
  this.prevView = Action.PrevView;
3599
3733
  this.nextView = Action.NextView;
3600
3734
  this.selectedDates = [];
3735
+ this.shouldHoverWhenNoStart = false;
3736
+ this.canHover = false;
3737
+ this.changes = {};
3738
+ this.valueSetter = false;
3739
+ this.selectionSetter = false;
3601
3740
  this._min = new Date(MIN_DATE);
3602
3741
  this._max = new Date(MAX_DATE);
3603
3742
  this._focusedDate = getToday();
3743
+ this._selectionRange = { start: null, end: null };
3604
3744
  this.resolvedPromise = Promise.resolve();
3605
3745
  this.onControlChange = noop$2;
3606
3746
  this.onControlTouched = noop$2;
@@ -3665,29 +3805,37 @@ class MultiViewCalendarComponent {
3665
3805
  get max() {
3666
3806
  return this._max;
3667
3807
  }
3808
+ /**
3809
+ * Sets the Calendar selection mode
3810
+ * ([see example]({% slug multiple_selection_multiviewcalendar %})).
3811
+ *
3812
+ * The available values are:
3813
+ * * `single` (default)
3814
+ * * `multiple`
3815
+ * * `range`
3816
+ */
3817
+ set selection(_selection) {
3818
+ this.selectionSetter = true;
3819
+ this._selection = _selection;
3820
+ }
3821
+ get selection() {
3822
+ return this._selection;
3823
+ }
3668
3824
  /**
3669
3825
  * Sets or gets the `value` property of the Calendar and defines the selected value of the component.
3670
3826
  *
3671
3827
  * > The `value` has to be a valid
3672
3828
  * [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date)
3673
- * instance when in `single` selection mode or an array of valid JavaScript Date instances when in `multiple` selection mode.
3829
+ * instance when in `single` selection mode, an array of valid JavaScript Date instances when in `multiple` selection mode, or
3830
+ * an object of type `SelectionRange` when in `range` selection mode.
3674
3831
  */
3832
+ set value(candidate) {
3833
+ this.valueSetter = true;
3834
+ this._value = candidate;
3835
+ }
3675
3836
  get value() {
3676
3837
  return this._value;
3677
3838
  }
3678
- set value(candidate) {
3679
- this.verifyValue(candidate);
3680
- this._value = Array.isArray(candidate) ?
3681
- candidate.filter(date => isPresent(date)).map(element => cloneDate(element)) :
3682
- cloneDate(candidate);
3683
- const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
3684
- if (!areDatesEqual(selection, this.selectedDates)) {
3685
- const lastSelected = last(selection);
3686
- this.rangePivot = cloneDate(lastSelected);
3687
- this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
3688
- this.selectedDates = selection;
3689
- }
3690
- }
3691
3839
  /**
3692
3840
  * @hidden
3693
3841
  */
@@ -3704,10 +3852,23 @@ class MultiViewCalendarComponent {
3704
3852
  set disabledDates(value) {
3705
3853
  this.disabledDatesService.initialize(value);
3706
3854
  }
3855
+ /**
3856
+ * Specify, which end of the defined selection range should be marked as active.
3857
+ *
3858
+ * > Value will be ignored if the selection range is undefined.
3859
+ * > If range selection is used then the default value is 'start'.
3860
+ */
3861
+ set activeRangeEnd(_activeRangeEnd) {
3862
+ this._activeRangeEnd = _activeRangeEnd;
3863
+ }
3864
+ get activeRangeEnd() {
3865
+ return (this.selection === 'range' && !this._activeRangeEnd) ? 'start' : this._activeRangeEnd;
3866
+ }
3707
3867
  /**
3708
3868
  * Sets or gets the `selectionRange` property of the Calendar and
3709
3869
  * defines the selection range of the component
3710
3870
  * ([see example]({% slug dates_multiviewcalendar %}#toc-selection-range)).
3871
+ * > We recommend using the `value` property as it now supports `range` selection.
3711
3872
  */
3712
3873
  set selectionRange(range) {
3713
3874
  this._selectionRange = range;
@@ -3931,8 +4092,13 @@ class MultiViewCalendarComponent {
3931
4092
  return;
3932
4093
  }
3933
4094
  else if (onEnterKeyPress) {
3934
- this.selectionService.lastClicked = this.focusedDate;
3935
- this.performSelection(this.focusedDate, event);
4095
+ if (this.selection !== 'range') {
4096
+ this.selectionService.lastClicked = this.focusedDate;
4097
+ this.performSelection(this.focusedDate, event);
4098
+ }
4099
+ else {
4100
+ this.performRangeSelection(this.focusedDate);
4101
+ }
3936
4102
  }
3937
4103
  if (this.views >= 2) {
3938
4104
  if ((escKey || (altKey && onArrowUpPress))) {
@@ -3955,7 +4121,7 @@ class MultiViewCalendarComponent {
3955
4121
  if (!isSameView) {
3956
4122
  this.emitNavigate(this.focusedDate);
3957
4123
  }
3958
- if (isArrowWithShiftPressed(event)) {
4124
+ if (isArrowWithShiftPressed(event) && this.selection !== 'range') {
3959
4125
  event['anyArrow'] = true;
3960
4126
  this.performSelection(this.focusedDate, event);
3961
4127
  }
@@ -3969,21 +4135,30 @@ class MultiViewCalendarComponent {
3969
4135
  }));
3970
4136
  }
3971
4137
  ngOnChanges(changes) {
4138
+ this.changes = changes;
3972
4139
  this.verifyChanges();
3973
4140
  this.bus.configure(this.bottomViewEnum, this.topViewEnum);
3974
- if (hasExistingValue(changes, 'focusedDate')) {
3975
- const focusedDate = changes.focusedDate.currentValue;
4141
+ }
4142
+ ngDoCheck() {
4143
+ if (this.valueSetter || this.selectionSetter) {
4144
+ this.setValue(this.value);
4145
+ this.valueSetter = false;
4146
+ this.selectionSetter = false;
4147
+ }
4148
+ if (hasExistingValue(this.changes, 'focusedDate')) {
4149
+ const focusedDate = this.changes.focusedDate.currentValue;
3976
4150
  this.focusedDate = dateInRange(focusedDate, this.min, this.max);
3977
4151
  }
3978
- if (changes.min || changes.max || changes.rangeValidation || changes.disabledDates || changes.disabledDatesRangeValidation) {
4152
+ if (this.changes.min || this.changes.max || this.changes.rangeValidation || this.changes.disabledDates || this.changes.disabledDatesRangeValidation) {
3979
4153
  this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop$2;
3980
4154
  this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop$2;
3981
4155
  this.disabledDatesRangeValidateFn = this.disabledDatesRangeValidation ? disabledDatesRangeValidator(this.disabledDatesService.isDateDisabled) : noop$2;
3982
4156
  this.onValidatorChange();
3983
4157
  }
3984
- if (changes.min || changes.max || changes.focusedDate || changes.activeView) {
4158
+ if (this.changes.min || this.changes.max || this.changes.focusedDate || this.changes.activeView) {
3985
4159
  this.updateButtonState();
3986
4160
  }
4161
+ this.changes = {};
3987
4162
  }
3988
4163
  ngOnDestroy() {
3989
4164
  this.subscriptions.unsubscribe();
@@ -4042,11 +4217,48 @@ class MultiViewCalendarComponent {
4042
4217
  if (this.disabledDatesService.isDateDisabled(this.focusedDate)) {
4043
4218
  return;
4044
4219
  }
4220
+ if (this.selection === 'range') {
4221
+ return;
4222
+ }
4045
4223
  this.selectedDates = availableDates.map(date => cloneDate(date));
4046
4224
  this.value = this.parseSelectionToValue(availableDates);
4047
4225
  this.onControlChange(this.parseSelectionToValue(availableDates));
4048
4226
  this.valueChange.emit(this.parseSelectionToValue(availableDates));
4049
4227
  }
4228
+ /**
4229
+ * @hidden
4230
+ */
4231
+ onCellEnter(cellEnter, date) {
4232
+ this.emitCellEvent(cellEnter, date);
4233
+ if (this.selection === 'range' && (this.canHover || this.shouldHoverWhenNoStart)) {
4234
+ this.zone.run(() => {
4235
+ if (this.canHover && !this.shouldHoverWhenNoStart) {
4236
+ if (this.allowReverse) {
4237
+ if (this.activeRangeEnd === 'end' && this.selectionRange.start) {
4238
+ this.selectionRange = { start: this.selectionRange.start, end: date };
4239
+ }
4240
+ if (this.activeRangeEnd === 'start' && this.selectionRange.end) {
4241
+ this.selectionRange = { start: date, end: this.selectionRange.end };
4242
+ }
4243
+ }
4244
+ else {
4245
+ if (this.activeRangeEnd === 'end' && this.selectionRange.start && date >= this.selectionRange.start) {
4246
+ this.selectionRange = { start: this.selectionRange.start, end: date };
4247
+ }
4248
+ if (this.selectionRange.start && date < this.selectionRange.start) {
4249
+ this.selectionRange = { start: this.selectionRange.start, end: null };
4250
+ }
4251
+ }
4252
+ }
4253
+ else if (this.shouldHoverWhenNoStart && date <= this.selectionRange.end) {
4254
+ this.selectionRange = { start: date, end: this.selectionRange.end };
4255
+ }
4256
+ else {
4257
+ this.selectionRange = { start: null, end: this.selectionRange.end };
4258
+ }
4259
+ });
4260
+ }
4261
+ }
4050
4262
  /**
4051
4263
  * @hidden
4052
4264
  */
@@ -4151,8 +4363,13 @@ class MultiViewCalendarComponent {
4151
4363
  * @hidden
4152
4364
  */
4153
4365
  handleCellClick({ date, modifiers }) {
4154
- this.selectionService.lastClicked = date;
4155
- this.performSelection(date, modifiers);
4366
+ if (this.selection === 'range') {
4367
+ this.performRangeSelection(date);
4368
+ }
4369
+ else {
4370
+ this.selectionService.lastClicked = date;
4371
+ this.performSelection(date, modifiers);
4372
+ }
4156
4373
  const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
4157
4374
  if (!isSameView) {
4158
4375
  this.emitNavigate(this.focusedDate);
@@ -4166,10 +4383,23 @@ class MultiViewCalendarComponent {
4166
4383
  return;
4167
4384
  }
4168
4385
  this.zone.run(() => {
4169
- this.handleDateChange({
4170
- selectedDates: dates,
4171
- focusedDate: last(dates)
4172
- });
4386
+ if (this.selection === 'multiple') {
4387
+ this.handleDateChange({
4388
+ selectedDates: dates,
4389
+ focusedDate: last(dates),
4390
+ });
4391
+ }
4392
+ if (this.selection === 'range') {
4393
+ this.activeRangeEnd = 'start';
4394
+ const shouldEmitValueChange = this.selectionRange.start?.getTime() !== dates[0].getTime() ||
4395
+ this.selectionRange.end?.getTime() !== last(dates).getTime();
4396
+ this.selectionRange.start = dates[0];
4397
+ this.selectionRange.end = last(dates);
4398
+ this.value = this.selectionRange;
4399
+ if (shouldEmitValueChange) {
4400
+ this.valueChange.emit(this.value);
4401
+ }
4402
+ }
4173
4403
  });
4174
4404
  }
4175
4405
  setClasses(element) {
@@ -4192,14 +4422,22 @@ class MultiViewCalendarComponent {
4192
4422
  if (!isDevMode()) {
4193
4423
  return;
4194
4424
  }
4195
- if (this.selection === 'single' && candidate && !(candidate instanceof Date)) {
4196
- throw new Error(`The 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK$5} for possible resolution.`);
4425
+ if (this.selection === 'single' && candidate && !(isNullOrDate(candidate))) {
4426
+ throw new Error(`When using 'single' selection the 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK$5} for possible resolution.`);
4197
4427
  }
4198
- else if (this.selection === 'multiple' && candidate && Array.isArray(candidate)) {
4199
- const onlyDates = candidate.every(value => value instanceof Date);
4200
- if (!onlyDates) {
4201
- throw new Error(`The 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK$5} for possible resolution.`);
4428
+ else if (this.selection === 'multiple' && candidate) {
4429
+ if (Array.isArray(candidate)) {
4430
+ const onlyDates = candidate.every(value => value instanceof Date);
4431
+ if (!onlyDates) {
4432
+ throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK$5} for possible resolution.`);
4433
+ }
4202
4434
  }
4435
+ if (Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
4436
+ throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK$5} for possible resolution.`);
4437
+ }
4438
+ }
4439
+ else if (this.selection === 'range' && candidate && !(isNullOrDate(candidate['start']) && isNullOrDate(candidate['end']))) {
4440
+ throw new Error(`The 'value' should be an object with start and end dates. Check ${VALUE_DOC_LINK$5} for possible resolution.`);
4203
4441
  }
4204
4442
  }
4205
4443
  updateButtonState() {
@@ -4213,6 +4451,72 @@ class MultiViewCalendarComponent {
4213
4451
  selection = selection || [];
4214
4452
  return this.selection === 'single' ? cloneDate(last(selection)) : selection.map(date => cloneDate(date));
4215
4453
  }
4454
+ setValue(candidate) {
4455
+ this.verifyValue(candidate);
4456
+ if (candidate === null) {
4457
+ this._value = null;
4458
+ this.selectedDates = [];
4459
+ }
4460
+ else if (Array.isArray(candidate)) {
4461
+ this.selectionRange = { start: null, end: null };
4462
+ this._value = candidate.filter(date => isPresent(date)).map(element => cloneDate(element));
4463
+ }
4464
+ else if (isObject(candidate) && Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
4465
+ this.selectedDates = [];
4466
+ this.selectionRange = { start: null, end: null };
4467
+ this._value = { start: null, end: null };
4468
+ this._value.start = candidate.start instanceof Date ? cloneDate(candidate.start) : null;
4469
+ this._value.end = candidate.end instanceof Date ? cloneDate(candidate.end) : null;
4470
+ this.selectionRange = Object.assign({}, this._value);
4471
+ if (this._value?.start && !this._value?.end) {
4472
+ this.activeRangeEnd = 'end';
4473
+ this.canHover = true;
4474
+ }
4475
+ if (this._value?.end && !this._value?.start) {
4476
+ this.activeRangeEnd = 'start';
4477
+ this.canHover = true;
4478
+ }
4479
+ if (this.activeRangeEnd === 'end') {
4480
+ this.focusedDate = this.selectionRange.start || this.selectionRange.end || getToday();
4481
+ }
4482
+ else {
4483
+ this.focusedDate = this.selectionRange.end || this.selectionRange.start || getToday();
4484
+ }
4485
+ }
4486
+ else {
4487
+ this.selectionRange = { start: null, end: null };
4488
+ this._value = cloneDate(candidate);
4489
+ }
4490
+ if (this.selection !== 'range') {
4491
+ const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
4492
+ if (!areDatesEqual(selection, this.selectedDates)) {
4493
+ const lastSelected = last(selection);
4494
+ this.rangePivot = cloneDate(lastSelected);
4495
+ this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
4496
+ this.selectedDates = selection;
4497
+ }
4498
+ }
4499
+ }
4500
+ performRangeSelection(date) {
4501
+ const clonedRangeSelection = Object.assign({}, this.selectionRange);
4502
+ const emitValueChange = (this.activeRangeEnd === 'start' && this.value?.start?.getTime() !== date?.getTime()) ||
4503
+ (this.activeRangeEnd === 'end' && this.value?.end?.getTime() !== date?.getTime());
4504
+ this.zone.run(() => {
4505
+ const rangeSelection = handleRangeSelection(date, clonedRangeSelection, this.activeRangeEnd, this.allowReverse);
4506
+ this.activeRangeEnd = rangeSelection.activeRangeEnd;
4507
+ if (this.canHover && rangeSelection.activeRangeEnd === 'end' && rangeSelection.selectionRange.end?.getTime() === date.getTime()) {
4508
+ this.activeRangeEnd = 'start';
4509
+ }
4510
+ this.canHover = this.activeRangeEnd === 'end' && rangeSelection.selectionRange.start && !rangeSelection.selectionRange.end;
4511
+ if (emitValueChange && (this.value?.start?.getTime() !== rangeSelection.selectionRange?.start?.getTime() ||
4512
+ this.value?.end?.getTime() !== rangeSelection.selectionRange?.end?.getTime())) {
4513
+ this.value = rangeSelection.selectionRange;
4514
+ this.valueChange.emit(this.value);
4515
+ this.rangeSelectionChange.emit(rangeSelection);
4516
+ }
4517
+ this.cdr.markForCheck();
4518
+ });
4519
+ }
4216
4520
  performSelection(date, selectionModifiers) {
4217
4521
  const selection = this.selectionService.performSelection({
4218
4522
  date: date,
@@ -4230,7 +4534,7 @@ class MultiViewCalendarComponent {
4230
4534
  }
4231
4535
  }
4232
4536
  MultiViewCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MultiViewCalendarComponent, deps: [{ token: BusViewService }, { token: i0.ElementRef }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: DisabledDatesService }, { token: SelectionService }], target: i0.ɵɵFactoryTarget.Component });
4233
- MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { showOtherMonthDays: "showOtherMonthDays", showCalendarHeader: "showCalendarHeader", id: "id", focusedDate: "focusedDate", footer: "footer", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", weekDaysFormat: "weekDaysFormat", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], headerTemplateRef: ["headerTemplate", "headerTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", blurEvent: "blur", focusEvent: "focus", focusCalendar: "focusCalendar", onClosePopup: "onClosePopup", onTabPress: "onTabPress", onShiftTabPress: "onShiftTabPress" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
4537
+ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { showOtherMonthDays: "showOtherMonthDays", showCalendarHeader: "showCalendarHeader", id: "id", focusedDate: "focusedDate", footer: "footer", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", allowReverse: "allowReverse", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", weekDaysFormat: "weekDaysFormat", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], headerTemplateRef: ["headerTemplate", "headerTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", rangeSelectionChange: "rangeSelectionChange", blurEvent: "blur", focusEvent: "focus", focusCalendar: "focusCalendar", onClosePopup: "onClosePopup", onTabPress: "onTabPress", onShiftTabPress: "onShiftTabPress" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
4234
4538
  BusViewService,
4235
4539
  RANGE_CALENDAR_VALUE_ACCESSOR,
4236
4540
  RANGE_CALENDAR_RANGE_VALIDATORS,
@@ -4278,6 +4582,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
4278
4582
  </kendo-calendar-header>
4279
4583
  <kendo-calendar-horizontal
4280
4584
  [showOtherMonthDays]="showOtherMonthDays"
4585
+ [allowReverse]="allowReverse"
4281
4586
  [id]="calendarHeaderIdLabel"
4282
4587
  [attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
4283
4588
  [activeView]="activeViewEnum"
@@ -4302,7 +4607,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
4302
4607
  [disabled]="disabled"
4303
4608
  (cellClick)="handleCellClick($event)"
4304
4609
  (weekNumberCellClick)="handleWeekNumberClick($event)"
4305
- (cellEnter)="emitCellEvent(cellEnter, $event)"
4610
+ (cellEnter)="onCellEnter(cellEnter, $event)"
4306
4611
  (cellLeave)="emitCellEvent(cellLeave, $event)"
4307
4612
  (activeDateChange)="setActiveDate($event)"
4308
4613
  (focusCalendar)="handleFocus()"
@@ -4315,7 +4620,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
4315
4620
  [activeViewValue]="activeView"
4316
4621
  [currentDate]="activeDate">
4317
4622
  </kendo-calendar-footer>
4318
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "titleTemplateRef", "headerTemplateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { kind: "component", type: FooterComponent, selector: "kendo-calendar-footer", inputs: ["footerTemplateRef", "activeViewValue", "currentDate"] }, { kind: "component", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: ["showOtherMonthDays", "cellTemplateRef", "weekNumberTemplateRef", "activeRangeEnd", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectionRange", "selectedDates", "views", "showViewHeader", "animateNavigation", "orientation", "activeDescendant", "tabIndex", "disabled", "id", "weekDaysFormat", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "activeDateChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }, { kind: "directive", type: MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4623
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "titleTemplateRef", "headerTemplateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { kind: "component", type: FooterComponent, selector: "kendo-calendar-footer", inputs: ["footerTemplateRef", "activeViewValue", "currentDate"] }, { kind: "component", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: ["showOtherMonthDays", "cellTemplateRef", "weekNumberTemplateRef", "allowReverse", "activeRangeEnd", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectionRange", "selectedDates", "views", "showViewHeader", "animateNavigation", "orientation", "activeDescendant", "tabIndex", "disabled", "id", "weekDaysFormat", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "activeDateChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }, { kind: "directive", type: MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4319
4624
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MultiViewCalendarComponent, decorators: [{
4320
4625
  type: Component,
4321
4626
  args: [{
@@ -4371,6 +4676,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
4371
4676
  </kendo-calendar-header>
4372
4677
  <kendo-calendar-horizontal
4373
4678
  [showOtherMonthDays]="showOtherMonthDays"
4679
+ [allowReverse]="allowReverse"
4374
4680
  [id]="calendarHeaderIdLabel"
4375
4681
  [attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
4376
4682
  [activeView]="activeViewEnum"
@@ -4395,7 +4701,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
4395
4701
  [disabled]="disabled"
4396
4702
  (cellClick)="handleCellClick($event)"
4397
4703
  (weekNumberCellClick)="handleWeekNumberClick($event)"
4398
- (cellEnter)="emitCellEvent(cellEnter, $event)"
4704
+ (cellEnter)="onCellEnter(cellEnter, $event)"
4399
4705
  (cellLeave)="emitCellEvent(cellLeave, $event)"
4400
4706
  (activeDateChange)="setActiveDate($event)"
4401
4707
  (focusCalendar)="handleFocus()"
@@ -4430,6 +4736,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
4430
4736
  type: Input
4431
4737
  }], selection: [{
4432
4738
  type: Input
4739
+ }], allowReverse: [{
4740
+ type: Input
4433
4741
  }], value: [{
4434
4742
  type: Input
4435
4743
  }], disabled: [{
@@ -4474,6 +4782,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
4474
4782
  type: Output
4475
4783
  }], valueChange: [{
4476
4784
  type: Output
4785
+ }], rangeSelectionChange: [{
4786
+ type: Output
4477
4787
  }], blurEvent: [{
4478
4788
  type: Output,
4479
4789
  args: ['blur']
@@ -5401,6 +5711,7 @@ class ViewListComponent {
5401
5711
  this.disabled = false;
5402
5712
  this.showFooter = false;
5403
5713
  this.weekDaysFormat = 'short';
5714
+ this.cellEnter = new EventEmitter();
5404
5715
  this.cellClick = new EventEmitter();
5405
5716
  this.weekNumberCellClick = new EventEmitter();
5406
5717
  this.activeDateChange = new EventEmitter();
@@ -5550,7 +5861,7 @@ class ViewListComponent {
5550
5861
  }
5551
5862
  }
5552
5863
  ViewListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ViewListComponent, deps: [{ token: BusViewService }, { token: i0.ChangeDetectorRef }, { token: i1.IntlService }, { token: CalendarDOMService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
5553
- ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ViewListComponent, selector: "kendo-calendar-viewlist", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", headerTitleTemplateRef: "headerTitleTemplateRef", headerTemplateRef: "headerTemplateRef", footerTemplateRef: "footerTemplateRef", showOtherMonthDays: "showOtherMonthDays", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectedDates: "selectedDates", tabIndex: "tabIndex", disabled: "disabled", id: "id", showFooter: "showFooter", weekDaysFormat: "weekDaysFormat", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", activeDateChange: "activeDateChange", todayButtonClick: "todayButtonClick", pageChange: "pageChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { properties: { "class.k-vstack": "this.getComponentClass", "class.k-calendar-view": "this.getComponentClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true }, { propertyName: "headerComponent", first: true, predicate: HeaderComponent, descendants: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
5864
+ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ViewListComponent, selector: "kendo-calendar-viewlist", inputs: { allowReverse: "allowReverse", cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", headerTitleTemplateRef: "headerTitleTemplateRef", headerTemplateRef: "headerTemplateRef", footerTemplateRef: "footerTemplateRef", showOtherMonthDays: "showOtherMonthDays", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectedDates: "selectedDates", tabIndex: "tabIndex", disabled: "disabled", id: "id", showFooter: "showFooter", weekDaysFormat: "weekDaysFormat", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", weekNumber: "weekNumber" }, outputs: { cellEnter: "cellEnter", cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", activeDateChange: "activeDateChange", todayButtonClick: "todayButtonClick", pageChange: "pageChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { properties: { "class.k-vstack": "this.getComponentClass", "class.k-calendar-view": "this.getComponentClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true }, { propertyName: "headerComponent", first: true, predicate: HeaderComponent, descendants: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
5554
5865
  <kendo-calendar-header
5555
5866
  [currentDate]="activeDate"
5556
5867
  [min]="min"
@@ -5597,6 +5908,9 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
5597
5908
  <tbody class="k-calendar-tbody"
5598
5909
  *kFor="let date of dates"
5599
5910
  kendoCalendarView
5911
+ [allowReverse]="allowReverse"
5912
+ [activeRangeEnd]="activeRangeEnd"
5913
+ [selectionRange]="selectionRange"
5600
5914
  [showOtherMonthDays]="showOtherMonthDays"
5601
5915
  [headerTitle]="headerTitle"
5602
5916
  role="rowgroup"
@@ -5613,6 +5927,7 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
5613
5927
  (cellClick)="cellClick.emit($event)"
5614
5928
  (weekNumberCellClick)="weekNumberCellClick.emit($event)"
5615
5929
  (focusedCellId)="focusedCellChange.emit($event)"
5930
+ (cellEnter)="cellEnter.emit($event)"
5616
5931
  ></tbody>
5617
5932
  </table>
5618
5933
  </kendo-virtualization>
@@ -5622,7 +5937,7 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
5622
5937
  [activeViewValue]="activeViewValue"
5623
5938
  [currentDate]="activeDate">
5624
5939
  </kendo-calendar-footer>
5625
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }, { kind: "component", type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "titleTemplateRef", "headerTemplateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { kind: "component", type: FooterComponent, selector: "kendo-calendar-footer", inputs: ["footerTemplateRef", "activeViewValue", "currentDate"] }, { kind: "component", type: ViewComponent, selector: "[kendoCalendarView]", inputs: ["showOtherMonthDays", "direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef", "headerTitle"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "focusedCellId"] }, { kind: "component", type: VirtualizationComponent, selector: "kendo-virtualization", inputs: ["direction", "itemHeight", "itemWidth", "topOffset", "bottomOffset", "maxScrollDifference", "scrollOffsetSize", "scrollDuration", "skip", "take", "total"], outputs: ["activeIndexChange", "pageChange", "scrollChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5940
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }, { kind: "component", type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "titleTemplateRef", "headerTemplateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { kind: "component", type: FooterComponent, selector: "kendo-calendar-footer", inputs: ["footerTemplateRef", "activeViewValue", "currentDate"] }, { kind: "component", type: ViewComponent, selector: "[kendoCalendarView]", inputs: ["allowReverse", "showOtherMonthDays", "direction", "isActive", "activeView", "cellUID", "focusedDate", "viewDate", "activeRangeEnd", "selectionRange", "min", "max", "selectedDates", "weekNumber", "viewIndex", "templateRef", "weekNumberTemplateRef", "headerTitle"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "focusedCellId"] }, { kind: "component", type: VirtualizationComponent, selector: "kendo-virtualization", inputs: ["direction", "itemHeight", "itemWidth", "topOffset", "bottomOffset", "maxScrollDifference", "scrollOffsetSize", "scrollDuration", "skip", "take", "total"], outputs: ["activeIndexChange", "pageChange", "scrollChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5626
5941
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ViewListComponent, decorators: [{
5627
5942
  type: Component,
5628
5943
  args: [{
@@ -5675,6 +5990,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
5675
5990
  <tbody class="k-calendar-tbody"
5676
5991
  *kFor="let date of dates"
5677
5992
  kendoCalendarView
5993
+ [allowReverse]="allowReverse"
5994
+ [activeRangeEnd]="activeRangeEnd"
5995
+ [selectionRange]="selectionRange"
5678
5996
  [showOtherMonthDays]="showOtherMonthDays"
5679
5997
  [headerTitle]="headerTitle"
5680
5998
  role="rowgroup"
@@ -5691,6 +6009,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
5691
6009
  (cellClick)="cellClick.emit($event)"
5692
6010
  (weekNumberCellClick)="weekNumberCellClick.emit($event)"
5693
6011
  (focusedCellId)="focusedCellChange.emit($event)"
6012
+ (cellEnter)="cellEnter.emit($event)"
5694
6013
  ></tbody>
5695
6014
  </table>
5696
6015
  </kendo-virtualization>
@@ -5702,7 +6021,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
5702
6021
  </kendo-calendar-footer>
5703
6022
  `
5704
6023
  }]
5705
- }], ctorParameters: function () { return [{ type: BusViewService }, { type: i0.ChangeDetectorRef }, { type: i1.IntlService }, { type: CalendarDOMService }, { type: i0.Renderer2 }]; }, propDecorators: { cellTemplateRef: [{
6024
+ }], ctorParameters: function () { return [{ type: BusViewService }, { type: i0.ChangeDetectorRef }, { type: i1.IntlService }, { type: CalendarDOMService }, { type: i0.Renderer2 }]; }, propDecorators: { allowReverse: [{
6025
+ type: Input
6026
+ }], cellTemplateRef: [{
5706
6027
  type: Input
5707
6028
  }], weekNumberTemplateRef: [{
5708
6029
  type: Input
@@ -5738,8 +6059,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
5738
6059
  type: Input
5739
6060
  }], weekDaysFormat: [{
5740
6061
  type: Input
6062
+ }], activeRangeEnd: [{
6063
+ type: Input
6064
+ }], selectionRange: [{
6065
+ type: Input
5741
6066
  }], weekNumber: [{
5742
6067
  type: Input
6068
+ }], cellEnter: [{
6069
+ type: Output
5743
6070
  }], cellClick: [{
5744
6071
  type: Output
5745
6072
  }], weekNumberCellClick: [{
@@ -6067,15 +6394,14 @@ class CalendarComponent {
6067
6394
  * @default false
6068
6395
  */
6069
6396
  this.footer = false;
6397
+ this._selection = 'single';
6070
6398
  /**
6071
- * Sets the Calendar selection mode
6072
- * ([see example]({% slug multiple_selection_calendar %})).
6399
+ * Allows reverse selection when using `range` selection.
6400
+ * If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
6073
6401
  *
6074
- * The available values are:
6075
- * * `single` (default)
6076
- * * `multiple`
6402
+ * @default false
6077
6403
  */
6078
- this.selection = 'single';
6404
+ this.allowReverse = false;
6079
6405
  /**
6080
6406
  * Sets or gets the `disabled` property of the Calendar and
6081
6407
  * determines whether the component is active
@@ -6160,8 +6486,10 @@ class CalendarComponent {
6160
6486
  */
6161
6487
  this.valueChange = new EventEmitter();
6162
6488
  this._size = DEFAULT_SIZE;
6489
+ this._activeRangeEnd = 'start';
6163
6490
  this.isActive = false;
6164
6491
  this.cellUID = guid();
6492
+ this.selectionRange = { start: null, end: null };
6165
6493
  this.selectedDates = [];
6166
6494
  this._min = new Date(MIN_DATE);
6167
6495
  this._max = new Date(MAX_DATE);
@@ -6171,11 +6499,15 @@ class CalendarComponent {
6171
6499
  this.onValidatorChange = noop$2;
6172
6500
  this.minValidateFn = noop$2;
6173
6501
  this.maxValidateFn = noop$2;
6502
+ this.changes = {};
6503
+ this.valueSetter = false;
6504
+ this.selectionSetter = false;
6174
6505
  this.syncNavigation = true;
6175
6506
  this._type = 'infinite';
6176
6507
  this.domEvents = [];
6177
6508
  this.resolvedPromise = Promise.resolve(null);
6178
6509
  this.destroyed = false;
6510
+ this.canHover = false;
6179
6511
  validatePackage(packageMetadata);
6180
6512
  this.id = `kendo-calendarid-${this.bus.calendarId}`;
6181
6513
  this.setClasses(element.nativeElement);
@@ -6262,29 +6594,37 @@ class CalendarComponent {
6262
6594
  get max() {
6263
6595
  return this._max;
6264
6596
  }
6597
+ /**
6598
+ * Sets the Calendar selection mode
6599
+ * ([see example]({% slug multiple_selection_calendar %})).
6600
+ *
6601
+ * The available values are:
6602
+ * * `single` (default)
6603
+ * * `multiple`
6604
+ * * `range`
6605
+ */
6606
+ set selection(_selection) {
6607
+ this._selection = _selection;
6608
+ this.selectionSetter = true;
6609
+ }
6610
+ get selection() {
6611
+ return this._selection;
6612
+ }
6265
6613
  /**
6266
6614
  * Sets or gets the `value` property of the Calendar and defines the selected value of the component.
6267
6615
  *
6268
6616
  * > The `value` has to be a valid
6269
6617
  * [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date)
6270
- * instance when in `single` selection mode or an array of valid JavaScript Date instances when in `multiple` selection mode.
6618
+ * instance when in `single` selection mode, an array of valid JavaScript Date instances when in `multiple` selection mode, or
6619
+ * an object of type `SelectionRange` when in `range` selection mode.
6271
6620
  */
6621
+ set value(candidate) {
6622
+ this.valueSetter = true;
6623
+ this._value = candidate;
6624
+ }
6272
6625
  get value() {
6273
6626
  return this._value;
6274
6627
  }
6275
- set value(candidate) {
6276
- this.verifyValue(candidate);
6277
- this._value = Array.isArray(candidate) ?
6278
- candidate.filter(date => isPresent(date)).map(element => cloneDate(element)) :
6279
- cloneDate(candidate);
6280
- const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
6281
- if (!areDatesEqual(selection, this.selectedDates)) {
6282
- const lastSelected = last(selection);
6283
- this.rangePivot = cloneDate(lastSelected);
6284
- this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
6285
- this.selectedDates = selection;
6286
- }
6287
- }
6288
6628
  /**
6289
6629
  * @hidden
6290
6630
  */
@@ -6465,6 +6805,18 @@ class CalendarComponent {
6465
6805
  get size() {
6466
6806
  return this._size;
6467
6807
  }
6808
+ /**
6809
+ * Specify, which end of the defined selection range should be marked as active.
6810
+ *
6811
+ * > Value will be ignored if the selection range is undefined.
6812
+ * > If range selection is used then the default value is 'start'.
6813
+ */
6814
+ set activeRangeEnd(_activeRangeEnd) {
6815
+ this._activeRangeEnd = _activeRangeEnd;
6816
+ }
6817
+ get activeRangeEnd() {
6818
+ return this._activeRangeEnd;
6819
+ }
6468
6820
  get activeViewEnum() {
6469
6821
  const activeView = CalendarViewEnum[this.activeView];
6470
6822
  return activeView < this.bottomViewEnum ? this.bottomViewEnum : activeView;
@@ -6497,21 +6849,30 @@ class CalendarComponent {
6497
6849
  }
6498
6850
  }
6499
6851
  ngOnChanges(changes) {
6852
+ this.changes = changes;
6500
6853
  this.verifyChanges();
6501
6854
  this.bus.configure(this.bottomViewEnum, this.topViewEnum);
6502
6855
  this.scrollSyncService.configure(this.activeViewEnum);
6503
- if (hasExistingValue(changes, 'focusedDate')) {
6504
- const focusedDate = changes.focusedDate.currentValue;
6856
+ }
6857
+ ngDoCheck() {
6858
+ if (this.valueSetter || this.selectionSetter) {
6859
+ this.setValue(this.value);
6860
+ this.valueSetter = false;
6861
+ this.selectionSetter = false;
6862
+ }
6863
+ if (hasExistingValue(this.changes, 'focusedDate')) {
6864
+ const focusedDate = this.changes.focusedDate.currentValue;
6505
6865
  this.focusedDate = dateInRange(focusedDate, this.min, this.max);
6506
6866
  }
6507
- if (changes.navigation) {
6867
+ if (this.changes.navigation) {
6508
6868
  this.syncNavigation = true;
6509
6869
  }
6510
- if (changes.min || changes.max || changes.rangeValidation) {
6870
+ if (this.changes.min || this.changes.max || this.changes.rangeValidation) {
6511
6871
  this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop$2;
6512
6872
  this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop$2;
6513
6873
  this.onValidatorChange();
6514
6874
  }
6875
+ this.changes = {};
6515
6876
  }
6516
6877
  ngAfterViewInit() {
6517
6878
  this.setAriaActivedescendant();
@@ -6544,6 +6905,31 @@ class CalendarComponent {
6544
6905
  }
6545
6906
  this.destroyed = true;
6546
6907
  }
6908
+ /**
6909
+ * @hidden
6910
+ */
6911
+ onCellEnter(date) {
6912
+ if (this.selection === 'range' && this.canHover) {
6913
+ this.ngZone.run(() => {
6914
+ if (this.allowReverse) {
6915
+ if (this.activeRangeEnd === 'end' && this.selectionRange.start) {
6916
+ this.selectionRange = { start: this.selectionRange.start, end: date };
6917
+ }
6918
+ if (this.activeRangeEnd === 'start' && this.selectionRange.end) {
6919
+ this.selectionRange = { start: date, end: this.selectionRange.end };
6920
+ }
6921
+ }
6922
+ else {
6923
+ if (this.activeRangeEnd === 'end' && this.selectionRange.start && date >= this.selectionRange.start) {
6924
+ this.selectionRange = { start: this.selectionRange.start, end: date };
6925
+ }
6926
+ if (this.selectionRange.start && date < this.selectionRange.start) {
6927
+ this.selectionRange = { start: this.selectionRange.start, end: null };
6928
+ }
6929
+ }
6930
+ });
6931
+ }
6932
+ }
6547
6933
  /**
6548
6934
  * @hidden
6549
6935
  */
@@ -6617,9 +7003,14 @@ class CalendarComponent {
6617
7003
  /**
6618
7004
  * @hidden
6619
7005
  */
6620
- handleMultiViewCalendarValueChange(date, focusedDate) {
6621
- const selectedDates = Array.isArray(date) ? date : [date];
6622
- this.handleDateChange({ selectedDates, focusedDate });
7006
+ handleMultiViewCalendarValueChange(value, focusedDate) {
7007
+ if (this.selection === 'range') {
7008
+ this.valueChange.emit(value);
7009
+ }
7010
+ else {
7011
+ const selectedDates = (Array.isArray(value) ? value : [value]);
7012
+ this.handleDateChange({ selectedDates, focusedDate });
7013
+ }
6623
7014
  }
6624
7015
  /**
6625
7016
  * @hidden
@@ -6643,6 +7034,9 @@ class CalendarComponent {
6643
7034
  if (this.disabledDatesService.isDateDisabled(this.focusedDate)) {
6644
7035
  return;
6645
7036
  }
7037
+ if (this.selection === 'range') {
7038
+ return;
7039
+ }
6646
7040
  this.ngZone.run(() => {
6647
7041
  this.selectedDates = availableDates.map(date => cloneDate(date));
6648
7042
  this.value = this.parseSelectionToValue(availableDates);
@@ -6755,8 +7149,13 @@ class CalendarComponent {
6755
7149
  */
6756
7150
  handleCellClick({ date, modifiers }) {
6757
7151
  this.focus();
6758
- this.selectionService.lastClicked = date;
6759
- this.performSelection(date, modifiers);
7152
+ if (this.selection === 'range') {
7153
+ this.performRangeSelection(date);
7154
+ }
7155
+ else {
7156
+ this.selectionService.lastClicked = date;
7157
+ this.performSelection(date, modifiers);
7158
+ }
6760
7159
  }
6761
7160
  /**
6762
7161
  * @hidden
@@ -6766,10 +7165,22 @@ class CalendarComponent {
6766
7165
  return;
6767
7166
  }
6768
7167
  this.ngZone.run(() => {
6769
- this.handleDateChange({
6770
- selectedDates: dates,
6771
- focusedDate: last(dates)
6772
- });
7168
+ if (this.selection === 'multiple') {
7169
+ this.handleDateChange({
7170
+ selectedDates: dates,
7171
+ focusedDate: last(dates),
7172
+ });
7173
+ }
7174
+ if (this.selection === 'range') {
7175
+ this.canHover = false;
7176
+ this.activeRangeEnd = 'start';
7177
+ const shouldEmitValueChange = this.selectionRange.start?.getTime() !== dates[0].getTime() ||
7178
+ this.selectionRange.end?.getTime() !== last(dates).getTime();
7179
+ this.value = { start: dates[0], end: last(dates) };
7180
+ if (shouldEmitValueChange) {
7181
+ this.valueChange.emit(this.value);
7182
+ }
7183
+ }
6773
7184
  });
6774
7185
  }
6775
7186
  /**
@@ -6833,14 +7244,22 @@ class CalendarComponent {
6833
7244
  if (!isDevMode()) {
6834
7245
  return;
6835
7246
  }
6836
- if (this.selection === 'single' && candidate && !(candidate instanceof Date)) {
6837
- throw new Error(`The 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK$4} for possible resolution.`);
7247
+ if (this.selection === 'single' && candidate && !(isNullOrDate(candidate))) {
7248
+ throw new Error(`When using 'single' selection the 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK$4} for possible resolution.`);
6838
7249
  }
6839
- else if (this.selection === 'multiple' && candidate && Array.isArray(candidate)) {
6840
- const onlyDates = candidate.every(value => value instanceof Date);
6841
- if (!onlyDates) {
6842
- throw new Error(`The 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK$4} for possible resolution.`);
7250
+ else if (this.selection === 'multiple' && candidate) {
7251
+ if (Array.isArray(candidate)) {
7252
+ const onlyDates = candidate.every(value => value instanceof Date);
7253
+ if (!onlyDates) {
7254
+ throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK$4} for possible resolution.`);
7255
+ }
6843
7256
  }
7257
+ if (Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
7258
+ throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK$4} for possible resolution.`);
7259
+ }
7260
+ }
7261
+ else if (this.selection === 'range' && candidate && !(isNullOrDate(candidate['start']) && isNullOrDate(candidate['end']))) {
7262
+ throw new Error(`The 'value' should be an object with start and end dates. Check ${VALUE_DOC_LINK$4} for possible resolution.`);
6844
7263
  }
6845
7264
  }
6846
7265
  bindEvents() {
@@ -6893,12 +7312,17 @@ class CalendarComponent {
6893
7312
  }
6894
7313
  if (args.keyCode === Keys$1.Enter) {
6895
7314
  this.selectionService.lastClicked = this.focusedDate;
6896
- this.performSelection(this.focusedDate, args);
7315
+ if (this.selection !== 'range') {
7316
+ this.performSelection(this.focusedDate, args);
7317
+ }
7318
+ else {
7319
+ this.performRangeSelection(this.focusedDate);
7320
+ }
6897
7321
  }
6898
7322
  if (args.keyCode === Keys$1.KeyT) {
6899
7323
  this.focusToday();
6900
7324
  }
6901
- if (isArrowWithShiftPressed(args)) {
7325
+ if (isArrowWithShiftPressed(args) && this.selection !== 'range') {
6902
7326
  args.anyArrow = true;
6903
7327
  this.performSelection(this.focusedDate, args);
6904
7328
  }
@@ -6937,6 +7361,78 @@ class CalendarComponent {
6937
7361
  selection = selection || [];
6938
7362
  return this.selection === 'single' ? cloneDate(last(selection)) : selection.map(date => cloneDate(date));
6939
7363
  }
7364
+ setValue(candidate) {
7365
+ this.verifyValue(candidate);
7366
+ if (candidate === null) {
7367
+ this._value = null;
7368
+ this.selectedDates = [];
7369
+ this.selectionRange = { start: null, end: null };
7370
+ }
7371
+ else if (Array.isArray(candidate)) {
7372
+ this.selectionRange = { start: null, end: null };
7373
+ this._value = candidate.filter(date => isPresent(date)).map(element => cloneDate(element));
7374
+ }
7375
+ else if (isObject(candidate) && Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
7376
+ this.selectedDates = [];
7377
+ this.selectionRange = { start: null, end: null };
7378
+ this._value = { start: null, end: null };
7379
+ this._value.start = candidate.start instanceof Date ? cloneDate(candidate.start) : null;
7380
+ this._value.end = candidate.end instanceof Date ? cloneDate(candidate.end) : null;
7381
+ this.selectionRange = Object.assign({}, this._value);
7382
+ if (this._value?.start && !this._value?.end) {
7383
+ this.activeRangeEnd = 'end';
7384
+ this.canHover = true;
7385
+ }
7386
+ if (this._value?.end && !this._value?.start) {
7387
+ this.activeRangeEnd = 'start';
7388
+ this.canHover = true;
7389
+ }
7390
+ if (this.activeRangeEnd === 'end') {
7391
+ this.focusedDate = this.selectionRange.start || this.selectionRange.end || getToday();
7392
+ }
7393
+ else {
7394
+ this.focusedDate = this.selectionRange.end || this.selectionRange.start || getToday();
7395
+ }
7396
+ }
7397
+ else {
7398
+ this.selectionRange = { start: null, end: null };
7399
+ this._value = cloneDate(candidate);
7400
+ }
7401
+ if (this.selection !== 'range') {
7402
+ const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
7403
+ if (!areDatesEqual(selection, this.selectedDates)) {
7404
+ const lastSelected = last(selection);
7405
+ this.rangePivot = cloneDate(lastSelected);
7406
+ this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
7407
+ this.selectedDates = selection;
7408
+ }
7409
+ }
7410
+ }
7411
+ performRangeSelection(date) {
7412
+ const clonedRangeSelection = Object.assign({}, this.selectionRange);
7413
+ const emitValueChange = (this.activeRangeEnd === 'start' && this.value?.start?.getTime() !== date?.getTime()) ||
7414
+ (this.activeRangeEnd === 'end' && this.value?.end?.getTime() !== date?.getTime());
7415
+ this.ngZone.run(() => {
7416
+ const rangeSelection = handleRangeSelection(date, clonedRangeSelection, this.activeRangeEnd, this.allowReverse);
7417
+ this.activeRangeEnd = rangeSelection.activeRangeEnd;
7418
+ if (this.canHover && rangeSelection.activeRangeEnd === 'end' && rangeSelection.selectionRange.end?.getTime() === date.getTime()) {
7419
+ this.activeRangeEnd = 'start';
7420
+ }
7421
+ if ((this.activeRangeEnd === 'end' && rangeSelection.selectionRange.start) ||
7422
+ (this.activeRangeEnd === 'start' && rangeSelection.selectionRange.end)) {
7423
+ this.canHover = true;
7424
+ }
7425
+ else {
7426
+ this.canHover = false;
7427
+ }
7428
+ if (emitValueChange && (this.value?.start?.getTime() !== rangeSelection.selectionRange?.start?.getTime() ||
7429
+ this.value?.end?.getTime() !== rangeSelection.selectionRange?.end?.getTime())) {
7430
+ this.value = rangeSelection.selectionRange;
7431
+ this.valueChange.emit(this.value);
7432
+ }
7433
+ this.cdr.markForCheck();
7434
+ });
7435
+ }
6940
7436
  performSelection(date, selectionModifiers) {
6941
7437
  const selection = this.selectionService.performSelection({
6942
7438
  date: date,
@@ -6954,7 +7450,7 @@ class CalendarComponent {
6954
7450
  }
6955
7451
  }
6956
7452
  CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarComponent, deps: [{ token: BusViewService }, { token: CalendarDOMService }, { token: i0.ElementRef }, { token: NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: ScrollSyncService }, { token: DisabledDatesService }, { token: i1$1.LocalizationService }, { token: SelectionService }, { token: PickerService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
6957
- 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: [
7453
+ 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", 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: [
6958
7454
  BusViewService,
6959
7455
  CALENDAR_VALUE_ACCESSOR,
6960
7456
  CALENDAR_RANGE_VALIDATORS,
@@ -6997,7 +7493,10 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
6997
7493
  </kendo-calendar-navigation>
6998
7494
  <kendo-calendar-viewlist
6999
7495
  [activeView]="activeViewEnum"
7496
+ [allowReverse]="allowReverse"
7000
7497
  [showOtherMonthDays]="showOtherMonthDays"
7498
+ [activeRangeEnd]="activeRangeEnd"
7499
+ [selectionRange]="selectionRange"
7001
7500
  [isActive]="isActive"
7002
7501
  [id]="headerId"
7003
7502
  [weekDaysFormat]="weekDaysFormat"
@@ -7025,6 +7524,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
7025
7524
  (pageChange)="onPageChange()"
7026
7525
  (focusCalendar)="handleFocus()"
7027
7526
  (blurCalendar)="handleBlur($event)"
7527
+ (cellEnter)="onCellEnter($event)"
7028
7528
  >
7029
7529
  </kendo-calendar-viewlist>
7030
7530
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
@@ -7036,6 +7536,9 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
7036
7536
  [min]="min"
7037
7537
  [max]="max"
7038
7538
  [id]="id"
7539
+ [activeRangeEnd]="activeRangeEnd"
7540
+ [selectionRange]="selectionRange"
7541
+ [allowReverse]="allowReverse"
7039
7542
  [disabled]="disabled"
7040
7543
  [isActive]="isActive"
7041
7544
  [showOtherMonthDays]="showOtherMonthDays"
@@ -7077,7 +7580,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
7077
7580
  </kendo-multiviewcalendar-messages>
7078
7581
  </kendo-multiviewcalendar>
7079
7582
  </ng-container>
7080
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }, { kind: "component", type: 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: NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { kind: "directive", type: CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { kind: "component", type: 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 });
7583
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }, { kind: "component", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["showOtherMonthDays", "showCalendarHeader", "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: NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { kind: "directive", type: CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { kind: "component", type: 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", "weekNumber"], outputs: ["cellEnter", "cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
7081
7584
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarComponent, decorators: [{
7082
7585
  type: Component,
7083
7586
  args: [{
@@ -7128,7 +7631,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
7128
7631
  </kendo-calendar-navigation>
7129
7632
  <kendo-calendar-viewlist
7130
7633
  [activeView]="activeViewEnum"
7634
+ [allowReverse]="allowReverse"
7131
7635
  [showOtherMonthDays]="showOtherMonthDays"
7636
+ [activeRangeEnd]="activeRangeEnd"
7637
+ [selectionRange]="selectionRange"
7132
7638
  [isActive]="isActive"
7133
7639
  [id]="headerId"
7134
7640
  [weekDaysFormat]="weekDaysFormat"
@@ -7156,6 +7662,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
7156
7662
  (pageChange)="onPageChange()"
7157
7663
  (focusCalendar)="handleFocus()"
7158
7664
  (blurCalendar)="handleBlur($event)"
7665
+ (cellEnter)="onCellEnter($event)"
7159
7666
  >
7160
7667
  </kendo-calendar-viewlist>
7161
7668
  <kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
@@ -7167,6 +7674,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
7167
7674
  [min]="min"
7168
7675
  [max]="max"
7169
7676
  [id]="id"
7677
+ [activeRangeEnd]="activeRangeEnd"
7678
+ [selectionRange]="selectionRange"
7679
+ [allowReverse]="allowReverse"
7170
7680
  [disabled]="disabled"
7171
7681
  [isActive]="isActive"
7172
7682
  [showOtherMonthDays]="showOtherMonthDays"
@@ -7230,6 +7740,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
7230
7740
  type: Input
7231
7741
  }], selection: [{
7232
7742
  type: Input
7743
+ }], allowReverse: [{
7744
+ type: Input
7233
7745
  }], value: [{
7234
7746
  type: Input
7235
7747
  }], disabled: [{
@@ -7333,6 +7845,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
7333
7845
  args: ['navigationItemTemplate']
7334
7846
  }], size: [{
7335
7847
  type: Input
7848
+ }], activeRangeEnd: [{
7849
+ type: Input
7336
7850
  }], navigationView: [{
7337
7851
  type: ViewChild,
7338
7852
  args: [NavigationComponent, { static: false }]
@@ -9860,7 +10374,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
9860
10374
  </kendo-calendar-messages>
9861
10375
  </kendo-calendar>
9862
10376
  </ng-template>
9863
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "isRequired", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { kind: "component", type: CalendarComponent, selector: "kendo-calendar", inputs: ["showOtherMonthDays", "id", "focusedDate", "min", "max", "rangeValidation", "weekDaysFormat", "footer", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "navigationItemTemplate", "size"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { kind: "component", type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { kind: "directive", type: i12.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: i6.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i11.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "directive", type: i11.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { kind: "component", type: i12.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: i7.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: DatePickerLocalizedMessagesDirective, selector: "[kendoDatePickerLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10377
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "isRequired", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { kind: "component", type: CalendarComponent, selector: "kendo-calendar", inputs: ["showOtherMonthDays", "id", "focusedDate", "min", "max", "rangeValidation", "weekDaysFormat", "footer", "selection", "allowReverse", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "navigationItemTemplate", "size", "activeRangeEnd"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { kind: "component", type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { kind: "directive", type: i12.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: i6.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i11.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "directive", type: i11.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { kind: "component", type: i12.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: i7.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: DatePickerLocalizedMessagesDirective, selector: "[kendoDatePickerLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9864
10378
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DatePickerComponent, decorators: [{
9865
10379
  type: Component,
9866
10380
  args: [{
@@ -15281,7 +15795,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
15281
15795
  </div>
15282
15796
  </div>
15283
15797
  </ng-template>
15284
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "isRequired", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { kind: "component", type: CalendarComponent, selector: "kendo-calendar", inputs: ["showOtherMonthDays", "id", "focusedDate", "min", "max", "rangeValidation", "weekDaysFormat", "footer", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "navigationItemTemplate", "size"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { kind: "component", type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { kind: "component", type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }, { kind: "component", type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject", "tabOutLastPart"], exportAs: ["kendo-timeselector"] }, { kind: "directive", type: i12.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: i6.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i11.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "directive", type: i11.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { kind: "component", type: i12.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: i7.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15798
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "isRequired", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "allowCaretMode", "autoFill", "incompleteDateValidation", "twoDigitYearMax", "enableMouseWheel", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { kind: "component", type: CalendarComponent, selector: "kendo-calendar", inputs: ["showOtherMonthDays", "id", "focusedDate", "min", "max", "rangeValidation", "weekDaysFormat", "footer", "selection", "allowReverse", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "navigationItemTemplate", "size", "activeRangeEnd"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { kind: "component", type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { kind: "component", type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }, { kind: "component", type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject", "tabOutLastPart"], exportAs: ["kendo-timeselector"] }, { kind: "directive", type: i12.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: i6.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i11.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "directive", type: i11.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { kind: "component", type: i12.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: i7.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15285
15799
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerComponent, decorators: [{
15286
15800
  type: Component,
15287
15801
  args: [{
@@ -16339,6 +16853,13 @@ class DateRangePopupComponent {
16339
16853
  this.localization = localization;
16340
16854
  this.cdr = cdr;
16341
16855
  this.rtl = rtl;
16856
+ /**
16857
+ * Allows reverse selection when using `range` selection.
16858
+ * If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
16859
+ *
16860
+ * @default false
16861
+ */
16862
+ this.allowReverse = false;
16342
16863
  /**
16343
16864
  * Controls the popup animation.
16344
16865
  * By default, the opening and closing animations are enabled.
@@ -16487,6 +17008,14 @@ class DateRangePopupComponent {
16487
17008
  this.actionSheet.titleId = changes.first?.headerId;
16488
17009
  this.cdr.detectChanges();
16489
17010
  }));
17011
+ this.calendarSubscriptions.add(this.dateRangeService.startInput$?.value?.valueChange.subscribe((res) => {
17012
+ if (!res && this.dateRangeService.selectionRange.end) {
17013
+ this.calendar.shouldHoverWhenNoStart = true;
17014
+ }
17015
+ else {
17016
+ this.calendar.shouldHoverWhenNoStart = false;
17017
+ }
17018
+ }));
16490
17019
  if (isWindowAvailable()) {
16491
17020
  this.zone.runOutsideAngular(() => this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this)));
16492
17021
  }
@@ -16510,6 +17039,19 @@ class DateRangePopupComponent {
16510
17039
  this.windowBlurSubscription.unsubscribe();
16511
17040
  }
16512
17041
  }
17042
+ /**
17043
+ * @hidden
17044
+ *
17045
+ */
17046
+ onRangeSelectionChange(rangeSelection) {
17047
+ this.dateRangeService.setActiveRangeEnd(rangeSelection.activeRangeEnd);
17048
+ if (!this.isAdaptive) {
17049
+ this.dateRangeService.setRange(rangeSelection.selectionRange);
17050
+ }
17051
+ else {
17052
+ this._rangeSelection = rangeSelection.selectionRange;
17053
+ }
17054
+ }
16513
17055
  /**
16514
17056
  * Opens the popup component and focuses the calendar.
16515
17057
  */
@@ -16577,7 +17119,7 @@ class DateRangePopupComponent {
16577
17119
  * @hidden
16578
17120
  */
16579
17121
  handleAccept() {
16580
- this.dateRangeSelectionDirective.setRange(this.dateRangeService.selectionRange);
17122
+ this.dateRangeService.setRange(this._rangeSelection);
16581
17123
  this.show = false;
16582
17124
  }
16583
17125
  /**
@@ -16757,7 +17299,7 @@ class DateRangePopupComponent {
16757
17299
  }
16758
17300
  }
16759
17301
  DateRangePopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateRangePopupComponent, deps: [{ token: i1$2.PopupService }, { token: DateRangeService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Component });
16760
- DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: { animate: "animate", anchor: "anchor", anchorAlign: "anchorAlign", appendTo: "appendTo", collision: "collision", popupAlign: "popupAlign", margin: "margin", adaptiveMode: "adaptiveMode", title: "title", subtitle: "subtitle" }, outputs: { open: "open", close: "close", onBlur: "blur", onFocus: "focus", cancel: "cancel" }, providers: [
17302
+ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: { allowReverse: "allowReverse", animate: "animate", anchor: "anchor", anchorAlign: "anchorAlign", appendTo: "appendTo", collision: "collision", popupAlign: "popupAlign", margin: "margin", adaptiveMode: "adaptiveMode", title: "title", subtitle: "subtitle" }, outputs: { open: "open", close: "close", onBlur: "blur", onFocus: "focus", cancel: "cancel" }, providers: [
16761
17303
  LocalizationService,
16762
17304
  {
16763
17305
  provide: L10N_PREFIX,
@@ -16780,7 +17322,15 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
16780
17322
  </ng-container>
16781
17323
  <ng-container #container></ng-container>
16782
17324
  <ng-template #defaultTemplate>
16783
- <kendo-multiviewcalendar kendoDateRangeSelection (onClosePopup)="closePopup($event)" (onTabPress)="handleTab($event)" (onShiftTabPress)="handleShiftTab($event)"></kendo-multiviewcalendar>
17325
+ <kendo-multiviewcalendar
17326
+ [allowReverse]="allowReverse"
17327
+ selection="range"
17328
+ [value]="dateRangeService.selectionRange"
17329
+ (onClosePopup)="closePopup($event)"
17330
+ (onTabPress)="handleTab($event)"
17331
+ (onShiftTabPress)="handleShiftTab($event)"
17332
+ (rangeSelectionChange)="onRangeSelectionChange($event)"
17333
+ ></kendo-multiviewcalendar>
16784
17334
  </ng-template>
16785
17335
 
16786
17336
  <kendo-actionsheet
@@ -16821,8 +17371,12 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
16821
17371
  <kendo-multiviewcalendar
16822
17372
  class="k-calendar-lg"
16823
17373
  orientation="vertical"
16824
- kendoDateRangeSelection
16825
- [shouldSetRange]="false">
17374
+ [allowReverse]="allowReverse"
17375
+ [focusedDate]="dateRangeService.focusedDate"
17376
+ [value]="dateRangeService.selectionRange"
17377
+ selection="range"
17378
+ (rangeSelectionChange)="onRangeSelectionChange($event)"
17379
+ >
16826
17380
  </kendo-multiviewcalendar>
16827
17381
  </div>
16828
17382
  </div>
@@ -16850,7 +17404,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
16850
17404
  </div>
16851
17405
  </ng-template>
16852
17406
  </kendo-actionsheet>
16853
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: 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: i11.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "directive", type: i11.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { kind: "component", type: i12.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: i7.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: DateRangeSelectionDirective, selector: "[kendoDateRangeSelection]", inputs: ["autoCorrectOn", "selectionRange", "activeRangeEnd", "shouldSetRange"], outputs: ["activeRangeEndChange", "selectionRangeChange"] }, { kind: "directive", type: DateRangePopupLocalizedMessagesDirective, selector: "[kendoDateRangePopupLocalizedMessages]" }] });
17407
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["showOtherMonthDays", "showCalendarHeader", "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: i11.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { kind: "directive", type: i11.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { kind: "component", type: i12.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: i7.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: DateRangePopupLocalizedMessagesDirective, selector: "[kendoDateRangePopupLocalizedMessages]" }] });
16854
17408
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateRangePopupComponent, decorators: [{
16855
17409
  type: Component,
16856
17410
  args: [{
@@ -16880,7 +17434,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
16880
17434
  </ng-container>
16881
17435
  <ng-container #container></ng-container>
16882
17436
  <ng-template #defaultTemplate>
16883
- <kendo-multiviewcalendar kendoDateRangeSelection (onClosePopup)="closePopup($event)" (onTabPress)="handleTab($event)" (onShiftTabPress)="handleShiftTab($event)"></kendo-multiviewcalendar>
17437
+ <kendo-multiviewcalendar
17438
+ [allowReverse]="allowReverse"
17439
+ selection="range"
17440
+ [value]="dateRangeService.selectionRange"
17441
+ (onClosePopup)="closePopup($event)"
17442
+ (onTabPress)="handleTab($event)"
17443
+ (onShiftTabPress)="handleShiftTab($event)"
17444
+ (rangeSelectionChange)="onRangeSelectionChange($event)"
17445
+ ></kendo-multiviewcalendar>
16884
17446
  </ng-template>
16885
17447
 
16886
17448
  <kendo-actionsheet
@@ -16921,8 +17483,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
16921
17483
  <kendo-multiviewcalendar
16922
17484
  class="k-calendar-lg"
16923
17485
  orientation="vertical"
16924
- kendoDateRangeSelection
16925
- [shouldSetRange]="false">
17486
+ [allowReverse]="allowReverse"
17487
+ [focusedDate]="dateRangeService.focusedDate"
17488
+ [value]="dateRangeService.selectionRange"
17489
+ selection="range"
17490
+ (rangeSelectionChange)="onRangeSelectionChange($event)"
17491
+ >
16926
17492
  </kendo-multiviewcalendar>
16927
17493
  </div>
16928
17494
  </div>
@@ -16978,6 +17544,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
16978
17544
  }], contentCalendar: [{
16979
17545
  type: ContentChildren,
16980
17546
  args: [MultiViewCalendarComponent]
17547
+ }], allowReverse: [{
17548
+ type: Input
16981
17549
  }], animate: [{
16982
17550
  type: Input
16983
17551
  }], anchor: [{
@@ -17071,7 +17639,7 @@ DateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", versi
17071
17639
  DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: DateRangeComponent, selector: "kendo-daterange", host: { listeners: { "keydown": "keydown($event)" }, properties: { "class.k-daterangepicker": "this.wrapperClass" } }, providers: [DateRangeService], queries: [{ propertyName: "contentPopup", predicate: DateRangePopupComponent }], ngImport: i0, template: `
17072
17640
  <ng-content></ng-content>
17073
17641
  <kendo-daterange-popup *ngIf="showDefault"></kendo-daterange-popup>
17074
- `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: ["animate", "anchor", "anchorAlign", "appendTo", "collision", "popupAlign", "margin", "adaptiveMode", "title", "subtitle"], outputs: ["open", "close", "blur", "focus", "cancel"], exportAs: ["kendo-daterange-popup"] }] });
17642
+ `, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: ["allowReverse", "animate", "anchor", "anchorAlign", "appendTo", "collision", "popupAlign", "margin", "adaptiveMode", "title", "subtitle"], outputs: ["open", "close", "blur", "focus", "cancel"], exportAs: ["kendo-daterange-popup"] }] });
17075
17643
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateRangeComponent, decorators: [{
17076
17644
  type: Component,
17077
17645
  args: [{