@progress/kendo-angular-dateinputs 16.0.0-develop.12 → 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.
- package/calendar/calendar.component.d.ts +42 -8
- package/calendar/horizontal-view-list.component.d.ts +4 -3
- package/calendar/models/cell-context.interface.d.ts +4 -0
- package/calendar/models/selection-range.interface.d.ts +2 -2
- package/calendar/models/selection.d.ts +11 -1
- package/calendar/multiview-calendar.component.d.ts +40 -8
- package/calendar/view-list.component.d.ts +7 -1
- package/calendar/view.component.d.ts +2 -1
- package/common/utils.d.ts +4 -0
- package/daterange/date-range-popup.component.d.ts +15 -2
- package/esm2020/calendar/calendar.component.mjs +233 -45
- package/esm2020/calendar/horizontal-view-list.component.mjs +9 -5
- package/esm2020/calendar/models/selection.mjs +34 -1
- package/esm2020/calendar/multiview-calendar.component.mjs +226 -45
- package/esm2020/calendar/services/century-view.service.mjs +26 -5
- package/esm2020/calendar/services/decade-view.service.mjs +26 -5
- package/esm2020/calendar/services/month-view.service.mjs +26 -5
- package/esm2020/calendar/services/year-view.service.mjs +26 -5
- package/esm2020/calendar/view-list.component.mjs +20 -3
- package/esm2020/calendar/view.component.mjs +6 -3
- package/esm2020/common/utils.mjs +4 -0
- package/esm2020/datepicker/datepicker.component.mjs +1 -1
- package/esm2020/daterange/date-range-popup.component.mjs +64 -11
- package/esm2020/daterange/date-range.component.mjs +1 -1
- package/esm2020/datetimepicker/datetimepicker.component.mjs +1 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-dateinputs.mjs +710 -132
- package/fesm2020/progress-kendo-angular-dateinputs.mjs +700 -132
- 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:
|
|
42
|
-
version: '16.0.0-develop.
|
|
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
|
|
|
@@ -116,6 +116,10 @@ const currentFocusTarget = (blurArgs) => blurArgs.relatedTarget || document.acti
|
|
|
116
116
|
* @hidden
|
|
117
117
|
*/
|
|
118
118
|
const isPresent = (value) => value !== undefined && value !== null;
|
|
119
|
+
/**
|
|
120
|
+
* @hidden
|
|
121
|
+
*/
|
|
122
|
+
const isNullOrDate = (value) => value === null || value instanceof Date;
|
|
119
123
|
/**
|
|
120
124
|
* @hidden
|
|
121
125
|
*/
|
|
@@ -643,7 +647,7 @@ class CenturyViewService {
|
|
|
643
647
|
return range(0, count).map(i => addCenturies(start, i));
|
|
644
648
|
}
|
|
645
649
|
data(options) {
|
|
646
|
-
const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate } = options;
|
|
650
|
+
const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, allowReverse } = options;
|
|
647
651
|
if (!viewDate) {
|
|
648
652
|
return EMPTY_DATA$3;
|
|
649
653
|
}
|
|
@@ -659,10 +663,30 @@ class CenturyViewService {
|
|
|
659
663
|
if (!this.isInRange(cellDate, min, max) || nextCentury) {
|
|
660
664
|
return null;
|
|
661
665
|
}
|
|
662
|
-
|
|
663
|
-
|
|
666
|
+
let isRangeStart = false;
|
|
667
|
+
let isRangeEnd = false;
|
|
668
|
+
if (allowReverse) {
|
|
669
|
+
if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
|
|
670
|
+
(this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
|
|
671
|
+
isRangeStart = true;
|
|
672
|
+
}
|
|
673
|
+
if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
|
|
674
|
+
(this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
|
|
675
|
+
isRangeEnd = true;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
isRangeStart = this.isEqual(cellDate, selectionRange.start);
|
|
680
|
+
isRangeEnd = this.isEqual(cellDate, selectionRange.end);
|
|
681
|
+
}
|
|
664
682
|
const isInMiddle = !isRangeStart && !isRangeEnd;
|
|
665
|
-
|
|
683
|
+
let isRangeMid;
|
|
684
|
+
if (allowReverse) {
|
|
685
|
+
isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
|
|
689
|
+
}
|
|
666
690
|
return {
|
|
667
691
|
formattedValue: this.value(cellDate),
|
|
668
692
|
id: `${cellUID}${cellDate.getTime()}`,
|
|
@@ -676,7 +700,8 @@ class CenturyViewService {
|
|
|
676
700
|
isRangeSplitStart: isRangeMid && this.isEqual(cellDate, firstDate),
|
|
677
701
|
isToday: this.isEqual(cellDate, today),
|
|
678
702
|
title: this.cellTitle(cellDate),
|
|
679
|
-
value: cellDate
|
|
703
|
+
value: cellDate,
|
|
704
|
+
allowReverse: allowReverse
|
|
680
705
|
};
|
|
681
706
|
});
|
|
682
707
|
});
|
|
@@ -829,7 +854,7 @@ class DecadeViewService {
|
|
|
829
854
|
return range(0, count).map(i => addDecades(start, i));
|
|
830
855
|
}
|
|
831
856
|
data(options) {
|
|
832
|
-
const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate } = options;
|
|
857
|
+
const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, allowReverse } = options;
|
|
833
858
|
if (!viewDate) {
|
|
834
859
|
return EMPTY_DATA$2;
|
|
835
860
|
}
|
|
@@ -845,10 +870,30 @@ class DecadeViewService {
|
|
|
845
870
|
if (!this.isInRange(cellDate, min, max) || nextDecade) {
|
|
846
871
|
return null;
|
|
847
872
|
}
|
|
848
|
-
|
|
849
|
-
|
|
873
|
+
let isRangeStart = false;
|
|
874
|
+
let isRangeEnd = false;
|
|
875
|
+
if (allowReverse) {
|
|
876
|
+
if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
|
|
877
|
+
(this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
|
|
878
|
+
isRangeStart = true;
|
|
879
|
+
}
|
|
880
|
+
if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
|
|
881
|
+
(this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
|
|
882
|
+
isRangeEnd = true;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
else {
|
|
886
|
+
isRangeStart = this.isEqual(cellDate, selectionRange.start);
|
|
887
|
+
isRangeEnd = this.isEqual(cellDate, selectionRange.end);
|
|
888
|
+
}
|
|
850
889
|
const isInMiddle = !isRangeStart && !isRangeEnd;
|
|
851
|
-
|
|
890
|
+
let isRangeMid;
|
|
891
|
+
if (allowReverse) {
|
|
892
|
+
isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
|
|
893
|
+
}
|
|
894
|
+
else {
|
|
895
|
+
isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
|
|
896
|
+
}
|
|
852
897
|
return {
|
|
853
898
|
formattedValue: this.value(cellDate),
|
|
854
899
|
id: `${cellUID}${cellDate.getTime()}`,
|
|
@@ -862,7 +907,8 @@ class DecadeViewService {
|
|
|
862
907
|
isRangeSplitStart: isRangeMid && this.isEqual(cellDate, firstDate),
|
|
863
908
|
isToday: this.isEqual(cellDate, today),
|
|
864
909
|
title: this.cellTitle(cellDate),
|
|
865
|
-
value: cellDate
|
|
910
|
+
value: cellDate,
|
|
911
|
+
allowReverse: allowReverse
|
|
866
912
|
};
|
|
867
913
|
});
|
|
868
914
|
});
|
|
@@ -995,7 +1041,7 @@ class MonthViewService {
|
|
|
995
1041
|
return range(0, count).map(i => addMonths(start, i));
|
|
996
1042
|
}
|
|
997
1043
|
data(options) {
|
|
998
|
-
const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, isDateDisabled = () => false } = options;
|
|
1044
|
+
const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, isDateDisabled = () => false, allowReverse } = options;
|
|
999
1045
|
if (!viewDate) {
|
|
1000
1046
|
return EMPTY_DATA$1;
|
|
1001
1047
|
}
|
|
@@ -1017,10 +1063,30 @@ class MonthViewService {
|
|
|
1017
1063
|
if (outOfRange) {
|
|
1018
1064
|
return null;
|
|
1019
1065
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1066
|
+
let isRangeStart = false;
|
|
1067
|
+
let isRangeEnd = false;
|
|
1068
|
+
if (allowReverse) {
|
|
1069
|
+
if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
|
|
1070
|
+
(this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
|
|
1071
|
+
isRangeStart = true;
|
|
1072
|
+
}
|
|
1073
|
+
if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
|
|
1074
|
+
(this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
|
|
1075
|
+
isRangeEnd = true;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
else {
|
|
1079
|
+
isRangeStart = this.isEqual(cellDate, selectionRange.start);
|
|
1080
|
+
isRangeEnd = this.isEqual(cellDate, selectionRange.end);
|
|
1081
|
+
}
|
|
1022
1082
|
const isInMiddle = !isRangeStart && !isRangeEnd;
|
|
1023
|
-
|
|
1083
|
+
let isRangeMid;
|
|
1084
|
+
if (allowReverse) {
|
|
1085
|
+
isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
|
|
1086
|
+
}
|
|
1087
|
+
else {
|
|
1088
|
+
isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
|
|
1089
|
+
}
|
|
1024
1090
|
return {
|
|
1025
1091
|
formattedValue: this.value(cellDate),
|
|
1026
1092
|
id: `${cellUID}${otherMonth ? cellDate.getTime() + '1' : cellDate.getTime()}`,
|
|
@@ -1036,7 +1102,8 @@ class MonthViewService {
|
|
|
1036
1102
|
title: this.cellTitle(cellDate),
|
|
1037
1103
|
value: cellDate,
|
|
1038
1104
|
isDisabled: isDateDisabled(cellDate),
|
|
1039
|
-
isOtherMonth: otherMonth
|
|
1105
|
+
isOtherMonth: otherMonth,
|
|
1106
|
+
allowReverse: allowReverse
|
|
1040
1107
|
};
|
|
1041
1108
|
});
|
|
1042
1109
|
});
|
|
@@ -1181,7 +1248,7 @@ class YearViewService {
|
|
|
1181
1248
|
return range(0, count).map(i => addYears(start, i));
|
|
1182
1249
|
}
|
|
1183
1250
|
data(options) {
|
|
1184
|
-
const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate } = options;
|
|
1251
|
+
const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, allowReverse } = options;
|
|
1185
1252
|
if (!viewDate) {
|
|
1186
1253
|
return EMPTY_DATA;
|
|
1187
1254
|
}
|
|
@@ -1199,10 +1266,30 @@ class YearViewService {
|
|
|
1199
1266
|
if (!this.isInRange(cellDate, min, max) || changedYear) {
|
|
1200
1267
|
return null;
|
|
1201
1268
|
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1269
|
+
let isRangeStart = false;
|
|
1270
|
+
let isRangeEnd = false;
|
|
1271
|
+
if (allowReverse) {
|
|
1272
|
+
if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
|
|
1273
|
+
(this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
|
|
1274
|
+
isRangeStart = true;
|
|
1275
|
+
}
|
|
1276
|
+
if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
|
|
1277
|
+
(this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
|
|
1278
|
+
isRangeEnd = true;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
else {
|
|
1282
|
+
isRangeStart = this.isEqual(cellDate, selectionRange.start);
|
|
1283
|
+
isRangeEnd = this.isEqual(cellDate, selectionRange.end);
|
|
1284
|
+
}
|
|
1204
1285
|
const isInMiddle = !isRangeStart && !isRangeEnd;
|
|
1205
|
-
|
|
1286
|
+
let isRangeMid;
|
|
1287
|
+
if (allowReverse) {
|
|
1288
|
+
isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
|
|
1289
|
+
}
|
|
1290
|
+
else {
|
|
1291
|
+
isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
|
|
1292
|
+
}
|
|
1206
1293
|
return {
|
|
1207
1294
|
formattedValue: months[cellDate.getMonth()],
|
|
1208
1295
|
id: `${cellUID}${cellDate.getTime()}`,
|
|
@@ -1216,7 +1303,8 @@ class YearViewService {
|
|
|
1216
1303
|
isRangeSplitStart: isRangeMid && this.isEqual(cellDate, firstDate),
|
|
1217
1304
|
isToday: this.isEqual(cellDate, today),
|
|
1218
1305
|
title: this.cellTitle(cellDate),
|
|
1219
|
-
value: cellDate
|
|
1306
|
+
value: cellDate,
|
|
1307
|
+
allowReverse: allowReverse
|
|
1220
1308
|
};
|
|
1221
1309
|
});
|
|
1222
1310
|
});
|
|
@@ -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"> </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: {
|
|
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: {
|
|
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,42 @@ 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
|
+
var _a, _b;
|
|
3204
|
+
if ((activeRangeEnd === 'start' && ((_a = selectionRange.start) === null || _a === void 0 ? void 0 : _a.getTime()) === (date === null || date === void 0 ? void 0 : date.getTime()) && ((allowReverse && !selectionRange.end) || !allowReverse)) ||
|
|
3205
|
+
(activeRangeEnd === 'end' && ((_b = selectionRange.end) === null || _b === void 0 ? void 0 : _b.getTime()) === (date === null || date === void 0 ? void 0 : date.getTime()))) {
|
|
3206
|
+
return { activeRangeEnd: activeRangeEnd, selectionRange: selectionRange };
|
|
3207
|
+
}
|
|
3208
|
+
if (allowReverse) {
|
|
3209
|
+
if (activeRangeEnd === 'start') {
|
|
3210
|
+
selectionRange.start = date;
|
|
3211
|
+
activeRangeEnd = 'end';
|
|
3212
|
+
}
|
|
3213
|
+
else if (activeRangeEnd === 'end') {
|
|
3214
|
+
selectionRange.end = date;
|
|
3215
|
+
activeRangeEnd = 'start';
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
3218
|
+
if (!allowReverse) {
|
|
3219
|
+
if (activeRangeEnd === 'start' && date > selectionRange.end ||
|
|
3220
|
+
activeRangeEnd === 'end' && date < selectionRange.start) {
|
|
3221
|
+
selectionRange = { start: date, end: null };
|
|
3222
|
+
}
|
|
3223
|
+
else if (activeRangeEnd === 'start' && date <= selectionRange.end) {
|
|
3224
|
+
selectionRange.start = date;
|
|
3225
|
+
activeRangeEnd = 'end';
|
|
3226
|
+
}
|
|
3227
|
+
else if (activeRangeEnd === 'end' && date >= selectionRange.start) {
|
|
3228
|
+
selectionRange.end = date;
|
|
3229
|
+
activeRangeEnd = 'start';
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
return { activeRangeEnd: activeRangeEnd, selectionRange: selectionRange };
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3104
3235
|
/**
|
|
3105
3236
|
* @hidden
|
|
3106
3237
|
*/
|
|
@@ -3462,15 +3593,14 @@ class MultiViewCalendarComponent {
|
|
|
3462
3593
|
* ([see example]({% slug disabled_dates_multiviewcalendar %}#toc-validation)).
|
|
3463
3594
|
*/
|
|
3464
3595
|
this.disabledDatesRangeValidation = false;
|
|
3596
|
+
this._selection = 'single';
|
|
3465
3597
|
/**
|
|
3466
|
-
*
|
|
3467
|
-
*
|
|
3598
|
+
* Allows reverse selection when using `range` selection.
|
|
3599
|
+
* If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
|
|
3468
3600
|
*
|
|
3469
|
-
*
|
|
3470
|
-
* * `single` (default)
|
|
3471
|
-
* * `multiple`
|
|
3601
|
+
* @default false
|
|
3472
3602
|
*/
|
|
3473
|
-
this.
|
|
3603
|
+
this.allowReverse = false;
|
|
3474
3604
|
/**
|
|
3475
3605
|
* Sets or gets the `disabled` property of the Calendar and
|
|
3476
3606
|
* determines whether the component is active
|
|
@@ -3565,6 +3695,11 @@ class MultiViewCalendarComponent {
|
|
|
3565
3695
|
* ([see example](slug:events_multiviewcalendar)).
|
|
3566
3696
|
*/
|
|
3567
3697
|
this.valueChange = new EventEmitter();
|
|
3698
|
+
/**
|
|
3699
|
+
* @hidden
|
|
3700
|
+
* Fires when the range selection changes.
|
|
3701
|
+
*/
|
|
3702
|
+
this.rangeSelectionChange = new EventEmitter();
|
|
3568
3703
|
/**
|
|
3569
3704
|
* Fires each time the MultiViewCalendar gets blurred
|
|
3570
3705
|
* ([see example](slug:events_multiviewcalendar)).
|
|
@@ -3598,9 +3733,15 @@ class MultiViewCalendarComponent {
|
|
|
3598
3733
|
this.prevView = Action.PrevView;
|
|
3599
3734
|
this.nextView = Action.NextView;
|
|
3600
3735
|
this.selectedDates = [];
|
|
3736
|
+
this.shouldHoverWhenNoStart = false;
|
|
3737
|
+
this.canHover = false;
|
|
3738
|
+
this.changes = {};
|
|
3739
|
+
this.valueSetter = false;
|
|
3740
|
+
this.selectionSetter = false;
|
|
3601
3741
|
this._min = new Date(MIN_DATE);
|
|
3602
3742
|
this._max = new Date(MAX_DATE);
|
|
3603
3743
|
this._focusedDate = getToday();
|
|
3744
|
+
this._selectionRange = { start: null, end: null };
|
|
3604
3745
|
this.resolvedPromise = Promise.resolve();
|
|
3605
3746
|
this.onControlChange = noop$2;
|
|
3606
3747
|
this.onControlTouched = noop$2;
|
|
@@ -3665,29 +3806,37 @@ class MultiViewCalendarComponent {
|
|
|
3665
3806
|
get max() {
|
|
3666
3807
|
return this._max;
|
|
3667
3808
|
}
|
|
3809
|
+
/**
|
|
3810
|
+
* Sets the Calendar selection mode
|
|
3811
|
+
* ([see example]({% slug multiple_selection_multiviewcalendar %})).
|
|
3812
|
+
*
|
|
3813
|
+
* The available values are:
|
|
3814
|
+
* * `single` (default)
|
|
3815
|
+
* * `multiple`
|
|
3816
|
+
* * `range`
|
|
3817
|
+
*/
|
|
3818
|
+
set selection(_selection) {
|
|
3819
|
+
this.selectionSetter = true;
|
|
3820
|
+
this._selection = _selection;
|
|
3821
|
+
}
|
|
3822
|
+
get selection() {
|
|
3823
|
+
return this._selection;
|
|
3824
|
+
}
|
|
3668
3825
|
/**
|
|
3669
3826
|
* Sets or gets the `value` property of the Calendar and defines the selected value of the component.
|
|
3670
3827
|
*
|
|
3671
3828
|
* > The `value` has to be a valid
|
|
3672
3829
|
* [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date)
|
|
3673
|
-
* instance when in `single` selection mode
|
|
3830
|
+
* instance when in `single` selection mode, an array of valid JavaScript Date instances when in `multiple` selection mode, or
|
|
3831
|
+
* an object of type `SelectionRange` when in `range` selection mode.
|
|
3674
3832
|
*/
|
|
3833
|
+
set value(candidate) {
|
|
3834
|
+
this.valueSetter = true;
|
|
3835
|
+
this._value = candidate;
|
|
3836
|
+
}
|
|
3675
3837
|
get value() {
|
|
3676
3838
|
return this._value;
|
|
3677
3839
|
}
|
|
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
3840
|
/**
|
|
3692
3841
|
* @hidden
|
|
3693
3842
|
*/
|
|
@@ -3704,10 +3853,23 @@ class MultiViewCalendarComponent {
|
|
|
3704
3853
|
set disabledDates(value) {
|
|
3705
3854
|
this.disabledDatesService.initialize(value);
|
|
3706
3855
|
}
|
|
3856
|
+
/**
|
|
3857
|
+
* Specify, which end of the defined selection range should be marked as active.
|
|
3858
|
+
*
|
|
3859
|
+
* > Value will be ignored if the selection range is undefined.
|
|
3860
|
+
* > If range selection is used then the default value is 'start'.
|
|
3861
|
+
*/
|
|
3862
|
+
set activeRangeEnd(_activeRangeEnd) {
|
|
3863
|
+
this._activeRangeEnd = _activeRangeEnd;
|
|
3864
|
+
}
|
|
3865
|
+
get activeRangeEnd() {
|
|
3866
|
+
return (this.selection === 'range' && !this._activeRangeEnd) ? 'start' : this._activeRangeEnd;
|
|
3867
|
+
}
|
|
3707
3868
|
/**
|
|
3708
3869
|
* Sets or gets the `selectionRange` property of the Calendar and
|
|
3709
3870
|
* defines the selection range of the component
|
|
3710
3871
|
* ([see example]({% slug dates_multiviewcalendar %}#toc-selection-range)).
|
|
3872
|
+
* > We recommend using the `value` property as it now supports `range` selection.
|
|
3711
3873
|
*/
|
|
3712
3874
|
set selectionRange(range) {
|
|
3713
3875
|
this._selectionRange = range;
|
|
@@ -3931,8 +4093,13 @@ class MultiViewCalendarComponent {
|
|
|
3931
4093
|
return;
|
|
3932
4094
|
}
|
|
3933
4095
|
else if (onEnterKeyPress) {
|
|
3934
|
-
this.
|
|
3935
|
-
|
|
4096
|
+
if (this.selection !== 'range') {
|
|
4097
|
+
this.selectionService.lastClicked = this.focusedDate;
|
|
4098
|
+
this.performSelection(this.focusedDate, event);
|
|
4099
|
+
}
|
|
4100
|
+
else {
|
|
4101
|
+
this.performRangeSelection(this.focusedDate);
|
|
4102
|
+
}
|
|
3936
4103
|
}
|
|
3937
4104
|
if (this.views >= 2) {
|
|
3938
4105
|
if ((escKey || (altKey && onArrowUpPress))) {
|
|
@@ -3955,7 +4122,7 @@ class MultiViewCalendarComponent {
|
|
|
3955
4122
|
if (!isSameView) {
|
|
3956
4123
|
this.emitNavigate(this.focusedDate);
|
|
3957
4124
|
}
|
|
3958
|
-
if (isArrowWithShiftPressed(event)) {
|
|
4125
|
+
if (isArrowWithShiftPressed(event) && this.selection !== 'range') {
|
|
3959
4126
|
event['anyArrow'] = true;
|
|
3960
4127
|
this.performSelection(this.focusedDate, event);
|
|
3961
4128
|
}
|
|
@@ -3969,21 +4136,30 @@ class MultiViewCalendarComponent {
|
|
|
3969
4136
|
}));
|
|
3970
4137
|
}
|
|
3971
4138
|
ngOnChanges(changes) {
|
|
4139
|
+
this.changes = changes;
|
|
3972
4140
|
this.verifyChanges();
|
|
3973
4141
|
this.bus.configure(this.bottomViewEnum, this.topViewEnum);
|
|
3974
|
-
|
|
3975
|
-
|
|
4142
|
+
}
|
|
4143
|
+
ngDoCheck() {
|
|
4144
|
+
if (this.valueSetter || this.selectionSetter) {
|
|
4145
|
+
this.setValue(this.value);
|
|
4146
|
+
this.valueSetter = false;
|
|
4147
|
+
this.selectionSetter = false;
|
|
4148
|
+
}
|
|
4149
|
+
if (hasExistingValue(this.changes, 'focusedDate')) {
|
|
4150
|
+
const focusedDate = this.changes.focusedDate.currentValue;
|
|
3976
4151
|
this.focusedDate = dateInRange(focusedDate, this.min, this.max);
|
|
3977
4152
|
}
|
|
3978
|
-
if (changes.min || changes.max || changes.rangeValidation || changes.disabledDates || changes.disabledDatesRangeValidation) {
|
|
4153
|
+
if (this.changes.min || this.changes.max || this.changes.rangeValidation || this.changes.disabledDates || this.changes.disabledDatesRangeValidation) {
|
|
3979
4154
|
this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop$2;
|
|
3980
4155
|
this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop$2;
|
|
3981
4156
|
this.disabledDatesRangeValidateFn = this.disabledDatesRangeValidation ? disabledDatesRangeValidator(this.disabledDatesService.isDateDisabled) : noop$2;
|
|
3982
4157
|
this.onValidatorChange();
|
|
3983
4158
|
}
|
|
3984
|
-
if (changes.min || changes.max || changes.focusedDate || changes.activeView) {
|
|
4159
|
+
if (this.changes.min || this.changes.max || this.changes.focusedDate || this.changes.activeView) {
|
|
3985
4160
|
this.updateButtonState();
|
|
3986
4161
|
}
|
|
4162
|
+
this.changes = {};
|
|
3987
4163
|
}
|
|
3988
4164
|
ngOnDestroy() {
|
|
3989
4165
|
this.subscriptions.unsubscribe();
|
|
@@ -4042,11 +4218,48 @@ class MultiViewCalendarComponent {
|
|
|
4042
4218
|
if (this.disabledDatesService.isDateDisabled(this.focusedDate)) {
|
|
4043
4219
|
return;
|
|
4044
4220
|
}
|
|
4221
|
+
if (this.selection === 'range') {
|
|
4222
|
+
return;
|
|
4223
|
+
}
|
|
4045
4224
|
this.selectedDates = availableDates.map(date => cloneDate(date));
|
|
4046
4225
|
this.value = this.parseSelectionToValue(availableDates);
|
|
4047
4226
|
this.onControlChange(this.parseSelectionToValue(availableDates));
|
|
4048
4227
|
this.valueChange.emit(this.parseSelectionToValue(availableDates));
|
|
4049
4228
|
}
|
|
4229
|
+
/**
|
|
4230
|
+
* @hidden
|
|
4231
|
+
*/
|
|
4232
|
+
onCellEnter(cellEnter, date) {
|
|
4233
|
+
this.emitCellEvent(cellEnter, date);
|
|
4234
|
+
if (this.selection === 'range' && (this.canHover || this.shouldHoverWhenNoStart)) {
|
|
4235
|
+
this.zone.run(() => {
|
|
4236
|
+
if (this.canHover && !this.shouldHoverWhenNoStart) {
|
|
4237
|
+
if (this.allowReverse) {
|
|
4238
|
+
if (this.activeRangeEnd === 'end' && this.selectionRange.start) {
|
|
4239
|
+
this.selectionRange = { start: this.selectionRange.start, end: date };
|
|
4240
|
+
}
|
|
4241
|
+
if (this.activeRangeEnd === 'start' && this.selectionRange.end) {
|
|
4242
|
+
this.selectionRange = { start: date, end: this.selectionRange.end };
|
|
4243
|
+
}
|
|
4244
|
+
}
|
|
4245
|
+
else {
|
|
4246
|
+
if (this.activeRangeEnd === 'end' && this.selectionRange.start && date >= this.selectionRange.start) {
|
|
4247
|
+
this.selectionRange = { start: this.selectionRange.start, end: date };
|
|
4248
|
+
}
|
|
4249
|
+
if (this.selectionRange.start && date < this.selectionRange.start) {
|
|
4250
|
+
this.selectionRange = { start: this.selectionRange.start, end: null };
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
else if (this.shouldHoverWhenNoStart && date <= this.selectionRange.end) {
|
|
4255
|
+
this.selectionRange = { start: date, end: this.selectionRange.end };
|
|
4256
|
+
}
|
|
4257
|
+
else {
|
|
4258
|
+
this.selectionRange = { start: null, end: this.selectionRange.end };
|
|
4259
|
+
}
|
|
4260
|
+
});
|
|
4261
|
+
}
|
|
4262
|
+
}
|
|
4050
4263
|
/**
|
|
4051
4264
|
* @hidden
|
|
4052
4265
|
*/
|
|
@@ -4151,8 +4364,13 @@ class MultiViewCalendarComponent {
|
|
|
4151
4364
|
* @hidden
|
|
4152
4365
|
*/
|
|
4153
4366
|
handleCellClick({ date, modifiers }) {
|
|
4154
|
-
this.
|
|
4155
|
-
|
|
4367
|
+
if (this.selection === 'range') {
|
|
4368
|
+
this.performRangeSelection(date);
|
|
4369
|
+
}
|
|
4370
|
+
else {
|
|
4371
|
+
this.selectionService.lastClicked = date;
|
|
4372
|
+
this.performSelection(date, modifiers);
|
|
4373
|
+
}
|
|
4156
4374
|
const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
|
|
4157
4375
|
if (!isSameView) {
|
|
4158
4376
|
this.emitNavigate(this.focusedDate);
|
|
@@ -4166,10 +4384,24 @@ class MultiViewCalendarComponent {
|
|
|
4166
4384
|
return;
|
|
4167
4385
|
}
|
|
4168
4386
|
this.zone.run(() => {
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4387
|
+
var _a, _b;
|
|
4388
|
+
if (this.selection === 'multiple') {
|
|
4389
|
+
this.handleDateChange({
|
|
4390
|
+
selectedDates: dates,
|
|
4391
|
+
focusedDate: last(dates),
|
|
4392
|
+
});
|
|
4393
|
+
}
|
|
4394
|
+
if (this.selection === 'range') {
|
|
4395
|
+
this.activeRangeEnd = 'start';
|
|
4396
|
+
const shouldEmitValueChange = ((_a = this.selectionRange.start) === null || _a === void 0 ? void 0 : _a.getTime()) !== dates[0].getTime() ||
|
|
4397
|
+
((_b = this.selectionRange.end) === null || _b === void 0 ? void 0 : _b.getTime()) !== last(dates).getTime();
|
|
4398
|
+
this.selectionRange.start = dates[0];
|
|
4399
|
+
this.selectionRange.end = last(dates);
|
|
4400
|
+
this.value = this.selectionRange;
|
|
4401
|
+
if (shouldEmitValueChange) {
|
|
4402
|
+
this.valueChange.emit(this.value);
|
|
4403
|
+
}
|
|
4404
|
+
}
|
|
4173
4405
|
});
|
|
4174
4406
|
}
|
|
4175
4407
|
setClasses(element) {
|
|
@@ -4192,14 +4424,22 @@ class MultiViewCalendarComponent {
|
|
|
4192
4424
|
if (!isDevMode()) {
|
|
4193
4425
|
return;
|
|
4194
4426
|
}
|
|
4195
|
-
if (this.selection === 'single' && candidate && !(candidate
|
|
4196
|
-
throw new Error(`
|
|
4427
|
+
if (this.selection === 'single' && candidate && !(isNullOrDate(candidate))) {
|
|
4428
|
+
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
4429
|
}
|
|
4198
|
-
else if (this.selection === 'multiple' && candidate
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4430
|
+
else if (this.selection === 'multiple' && candidate) {
|
|
4431
|
+
if (Array.isArray(candidate)) {
|
|
4432
|
+
const onlyDates = candidate.every(value => value instanceof Date);
|
|
4433
|
+
if (!onlyDates) {
|
|
4434
|
+
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.`);
|
|
4435
|
+
}
|
|
4202
4436
|
}
|
|
4437
|
+
if (Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
|
|
4438
|
+
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.`);
|
|
4439
|
+
}
|
|
4440
|
+
}
|
|
4441
|
+
else if (this.selection === 'range' && candidate && !(isNullOrDate(candidate['start']) && isNullOrDate(candidate['end']))) {
|
|
4442
|
+
throw new Error(`The 'value' should be an object with start and end dates. Check ${VALUE_DOC_LINK$5} for possible resolution.`);
|
|
4203
4443
|
}
|
|
4204
4444
|
}
|
|
4205
4445
|
updateButtonState() {
|
|
@@ -4213,6 +4453,75 @@ class MultiViewCalendarComponent {
|
|
|
4213
4453
|
selection = selection || [];
|
|
4214
4454
|
return this.selection === 'single' ? cloneDate(last(selection)) : selection.map(date => cloneDate(date));
|
|
4215
4455
|
}
|
|
4456
|
+
setValue(candidate) {
|
|
4457
|
+
var _a, _b, _c, _d;
|
|
4458
|
+
this.verifyValue(candidate);
|
|
4459
|
+
if (candidate === null) {
|
|
4460
|
+
this._value = null;
|
|
4461
|
+
this.selectedDates = [];
|
|
4462
|
+
}
|
|
4463
|
+
else if (Array.isArray(candidate)) {
|
|
4464
|
+
this.selectionRange = { start: null, end: null };
|
|
4465
|
+
this._value = candidate.filter(date => isPresent(date)).map(element => cloneDate(element));
|
|
4466
|
+
}
|
|
4467
|
+
else if (isObject(candidate) && Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
|
|
4468
|
+
this.selectedDates = [];
|
|
4469
|
+
this.selectionRange = { start: null, end: null };
|
|
4470
|
+
this._value = { start: null, end: null };
|
|
4471
|
+
this._value.start = candidate.start instanceof Date ? cloneDate(candidate.start) : null;
|
|
4472
|
+
this._value.end = candidate.end instanceof Date ? cloneDate(candidate.end) : null;
|
|
4473
|
+
this.selectionRange = Object.assign({}, this._value);
|
|
4474
|
+
if (((_a = this._value) === null || _a === void 0 ? void 0 : _a.start) && !((_b = this._value) === null || _b === void 0 ? void 0 : _b.end)) {
|
|
4475
|
+
this.activeRangeEnd = 'end';
|
|
4476
|
+
this.canHover = true;
|
|
4477
|
+
}
|
|
4478
|
+
if (((_c = this._value) === null || _c === void 0 ? void 0 : _c.end) && !((_d = this._value) === null || _d === void 0 ? void 0 : _d.start)) {
|
|
4479
|
+
this.activeRangeEnd = 'start';
|
|
4480
|
+
this.canHover = true;
|
|
4481
|
+
}
|
|
4482
|
+
if (this.activeRangeEnd === 'end') {
|
|
4483
|
+
this.focusedDate = this.selectionRange.start || this.selectionRange.end || getToday();
|
|
4484
|
+
}
|
|
4485
|
+
else {
|
|
4486
|
+
this.focusedDate = this.selectionRange.end || this.selectionRange.start || getToday();
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
else {
|
|
4490
|
+
this.selectionRange = { start: null, end: null };
|
|
4491
|
+
this._value = cloneDate(candidate);
|
|
4492
|
+
}
|
|
4493
|
+
if (this.selection !== 'range') {
|
|
4494
|
+
const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
|
|
4495
|
+
if (!areDatesEqual(selection, this.selectedDates)) {
|
|
4496
|
+
const lastSelected = last(selection);
|
|
4497
|
+
this.rangePivot = cloneDate(lastSelected);
|
|
4498
|
+
this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
|
|
4499
|
+
this.selectedDates = selection;
|
|
4500
|
+
}
|
|
4501
|
+
}
|
|
4502
|
+
}
|
|
4503
|
+
performRangeSelection(date) {
|
|
4504
|
+
var _a, _b, _c, _d;
|
|
4505
|
+
const clonedRangeSelection = Object.assign({}, this.selectionRange);
|
|
4506
|
+
const emitValueChange = (this.activeRangeEnd === 'start' && ((_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.start) === null || _b === void 0 ? void 0 : _b.getTime()) !== (date === null || date === void 0 ? void 0 : date.getTime())) ||
|
|
4507
|
+
(this.activeRangeEnd === 'end' && ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.end) === null || _d === void 0 ? void 0 : _d.getTime()) !== (date === null || date === void 0 ? void 0 : date.getTime()));
|
|
4508
|
+
this.zone.run(() => {
|
|
4509
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
4510
|
+
const rangeSelection = handleRangeSelection(date, clonedRangeSelection, this.activeRangeEnd, this.allowReverse);
|
|
4511
|
+
this.activeRangeEnd = rangeSelection.activeRangeEnd;
|
|
4512
|
+
if (this.canHover && rangeSelection.activeRangeEnd === 'end' && ((_a = rangeSelection.selectionRange.end) === null || _a === void 0 ? void 0 : _a.getTime()) === date.getTime()) {
|
|
4513
|
+
this.activeRangeEnd = 'start';
|
|
4514
|
+
}
|
|
4515
|
+
this.canHover = this.activeRangeEnd === 'end' && rangeSelection.selectionRange.start && !rangeSelection.selectionRange.end;
|
|
4516
|
+
if (emitValueChange && (((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.start) === null || _c === void 0 ? void 0 : _c.getTime()) !== ((_e = (_d = rangeSelection.selectionRange) === null || _d === void 0 ? void 0 : _d.start) === null || _e === void 0 ? void 0 : _e.getTime()) ||
|
|
4517
|
+
((_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.end) === null || _g === void 0 ? void 0 : _g.getTime()) !== ((_j = (_h = rangeSelection.selectionRange) === null || _h === void 0 ? void 0 : _h.end) === null || _j === void 0 ? void 0 : _j.getTime()))) {
|
|
4518
|
+
this.value = rangeSelection.selectionRange;
|
|
4519
|
+
this.valueChange.emit(this.value);
|
|
4520
|
+
this.rangeSelectionChange.emit(rangeSelection);
|
|
4521
|
+
}
|
|
4522
|
+
this.cdr.markForCheck();
|
|
4523
|
+
});
|
|
4524
|
+
}
|
|
4216
4525
|
performSelection(date, selectionModifiers) {
|
|
4217
4526
|
const selection = this.selectionService.performSelection({
|
|
4218
4527
|
date: date,
|
|
@@ -4230,7 +4539,7 @@ class MultiViewCalendarComponent {
|
|
|
4230
4539
|
}
|
|
4231
4540
|
}
|
|
4232
4541
|
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: [
|
|
4542
|
+
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
4543
|
BusViewService,
|
|
4235
4544
|
RANGE_CALENDAR_VALUE_ACCESSOR,
|
|
4236
4545
|
RANGE_CALENDAR_RANGE_VALIDATORS,
|
|
@@ -4278,6 +4587,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
4278
4587
|
</kendo-calendar-header>
|
|
4279
4588
|
<kendo-calendar-horizontal
|
|
4280
4589
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
4590
|
+
[allowReverse]="allowReverse"
|
|
4281
4591
|
[id]="calendarHeaderIdLabel"
|
|
4282
4592
|
[attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
|
|
4283
4593
|
[activeView]="activeViewEnum"
|
|
@@ -4302,7 +4612,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
4302
4612
|
[disabled]="disabled"
|
|
4303
4613
|
(cellClick)="handleCellClick($event)"
|
|
4304
4614
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
4305
|
-
(cellEnter)="
|
|
4615
|
+
(cellEnter)="onCellEnter(cellEnter, $event)"
|
|
4306
4616
|
(cellLeave)="emitCellEvent(cellLeave, $event)"
|
|
4307
4617
|
(activeDateChange)="setActiveDate($event)"
|
|
4308
4618
|
(focusCalendar)="handleFocus()"
|
|
@@ -4315,7 +4625,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
4315
4625
|
[activeViewValue]="activeView"
|
|
4316
4626
|
[currentDate]="activeDate">
|
|
4317
4627
|
</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 });
|
|
4628
|
+
`, 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
4629
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: MultiViewCalendarComponent, decorators: [{
|
|
4320
4630
|
type: Component,
|
|
4321
4631
|
args: [{
|
|
@@ -4371,6 +4681,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
4371
4681
|
</kendo-calendar-header>
|
|
4372
4682
|
<kendo-calendar-horizontal
|
|
4373
4683
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
4684
|
+
[allowReverse]="allowReverse"
|
|
4374
4685
|
[id]="calendarHeaderIdLabel"
|
|
4375
4686
|
[attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
|
|
4376
4687
|
[activeView]="activeViewEnum"
|
|
@@ -4395,7 +4706,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
4395
4706
|
[disabled]="disabled"
|
|
4396
4707
|
(cellClick)="handleCellClick($event)"
|
|
4397
4708
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
4398
|
-
(cellEnter)="
|
|
4709
|
+
(cellEnter)="onCellEnter(cellEnter, $event)"
|
|
4399
4710
|
(cellLeave)="emitCellEvent(cellLeave, $event)"
|
|
4400
4711
|
(activeDateChange)="setActiveDate($event)"
|
|
4401
4712
|
(focusCalendar)="handleFocus()"
|
|
@@ -4430,6 +4741,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
4430
4741
|
type: Input
|
|
4431
4742
|
}], selection: [{
|
|
4432
4743
|
type: Input
|
|
4744
|
+
}], allowReverse: [{
|
|
4745
|
+
type: Input
|
|
4433
4746
|
}], value: [{
|
|
4434
4747
|
type: Input
|
|
4435
4748
|
}], disabled: [{
|
|
@@ -4474,6 +4787,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
4474
4787
|
type: Output
|
|
4475
4788
|
}], valueChange: [{
|
|
4476
4789
|
type: Output
|
|
4790
|
+
}], rangeSelectionChange: [{
|
|
4791
|
+
type: Output
|
|
4477
4792
|
}], blurEvent: [{
|
|
4478
4793
|
type: Output,
|
|
4479
4794
|
args: ['blur']
|
|
@@ -5403,6 +5718,7 @@ class ViewListComponent {
|
|
|
5403
5718
|
this.disabled = false;
|
|
5404
5719
|
this.showFooter = false;
|
|
5405
5720
|
this.weekDaysFormat = 'short';
|
|
5721
|
+
this.cellEnter = new EventEmitter();
|
|
5406
5722
|
this.cellClick = new EventEmitter();
|
|
5407
5723
|
this.weekNumberCellClick = new EventEmitter();
|
|
5408
5724
|
this.activeDateChange = new EventEmitter();
|
|
@@ -5553,7 +5869,7 @@ class ViewListComponent {
|
|
|
5553
5869
|
}
|
|
5554
5870
|
}
|
|
5555
5871
|
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 });
|
|
5556
|
-
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: `
|
|
5872
|
+
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: `
|
|
5557
5873
|
<kendo-calendar-header
|
|
5558
5874
|
[currentDate]="activeDate"
|
|
5559
5875
|
[min]="min"
|
|
@@ -5600,6 +5916,9 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
5600
5916
|
<tbody class="k-calendar-tbody"
|
|
5601
5917
|
*kFor="let date of dates"
|
|
5602
5918
|
kendoCalendarView
|
|
5919
|
+
[allowReverse]="allowReverse"
|
|
5920
|
+
[activeRangeEnd]="activeRangeEnd"
|
|
5921
|
+
[selectionRange]="selectionRange"
|
|
5603
5922
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
5604
5923
|
[headerTitle]="headerTitle"
|
|
5605
5924
|
role="rowgroup"
|
|
@@ -5616,6 +5935,7 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
5616
5935
|
(cellClick)="cellClick.emit($event)"
|
|
5617
5936
|
(weekNumberCellClick)="weekNumberCellClick.emit($event)"
|
|
5618
5937
|
(focusedCellId)="focusedCellChange.emit($event)"
|
|
5938
|
+
(cellEnter)="cellEnter.emit($event)"
|
|
5619
5939
|
></tbody>
|
|
5620
5940
|
</table>
|
|
5621
5941
|
</kendo-virtualization>
|
|
@@ -5625,7 +5945,7 @@ ViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
5625
5945
|
[activeViewValue]="activeViewValue"
|
|
5626
5946
|
[currentDate]="activeDate">
|
|
5627
5947
|
</kendo-calendar-footer>
|
|
5628
|
-
`, 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 });
|
|
5948
|
+
`, 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 });
|
|
5629
5949
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ViewListComponent, decorators: [{
|
|
5630
5950
|
type: Component,
|
|
5631
5951
|
args: [{
|
|
@@ -5678,6 +5998,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
5678
5998
|
<tbody class="k-calendar-tbody"
|
|
5679
5999
|
*kFor="let date of dates"
|
|
5680
6000
|
kendoCalendarView
|
|
6001
|
+
[allowReverse]="allowReverse"
|
|
6002
|
+
[activeRangeEnd]="activeRangeEnd"
|
|
6003
|
+
[selectionRange]="selectionRange"
|
|
5681
6004
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
5682
6005
|
[headerTitle]="headerTitle"
|
|
5683
6006
|
role="rowgroup"
|
|
@@ -5694,6 +6017,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
5694
6017
|
(cellClick)="cellClick.emit($event)"
|
|
5695
6018
|
(weekNumberCellClick)="weekNumberCellClick.emit($event)"
|
|
5696
6019
|
(focusedCellId)="focusedCellChange.emit($event)"
|
|
6020
|
+
(cellEnter)="cellEnter.emit($event)"
|
|
5697
6021
|
></tbody>
|
|
5698
6022
|
</table>
|
|
5699
6023
|
</kendo-virtualization>
|
|
@@ -5705,7 +6029,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
5705
6029
|
</kendo-calendar-footer>
|
|
5706
6030
|
`
|
|
5707
6031
|
}]
|
|
5708
|
-
}], ctorParameters: function () { return [{ type: BusViewService }, { type: i0.ChangeDetectorRef }, { type: i1.IntlService }, { type: CalendarDOMService }, { type: i0.Renderer2 }]; }, propDecorators: {
|
|
6032
|
+
}], ctorParameters: function () { return [{ type: BusViewService }, { type: i0.ChangeDetectorRef }, { type: i1.IntlService }, { type: CalendarDOMService }, { type: i0.Renderer2 }]; }, propDecorators: { allowReverse: [{
|
|
6033
|
+
type: Input
|
|
6034
|
+
}], cellTemplateRef: [{
|
|
5709
6035
|
type: Input
|
|
5710
6036
|
}], weekNumberTemplateRef: [{
|
|
5711
6037
|
type: Input
|
|
@@ -5741,8 +6067,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
5741
6067
|
type: Input
|
|
5742
6068
|
}], weekDaysFormat: [{
|
|
5743
6069
|
type: Input
|
|
6070
|
+
}], activeRangeEnd: [{
|
|
6071
|
+
type: Input
|
|
6072
|
+
}], selectionRange: [{
|
|
6073
|
+
type: Input
|
|
5744
6074
|
}], weekNumber: [{
|
|
5745
6075
|
type: Input
|
|
6076
|
+
}], cellEnter: [{
|
|
6077
|
+
type: Output
|
|
5746
6078
|
}], cellClick: [{
|
|
5747
6079
|
type: Output
|
|
5748
6080
|
}], weekNumberCellClick: [{
|
|
@@ -6070,15 +6402,14 @@ class CalendarComponent {
|
|
|
6070
6402
|
* @default false
|
|
6071
6403
|
*/
|
|
6072
6404
|
this.footer = false;
|
|
6405
|
+
this._selection = 'single';
|
|
6073
6406
|
/**
|
|
6074
|
-
*
|
|
6075
|
-
*
|
|
6407
|
+
* Allows reverse selection when using `range` selection.
|
|
6408
|
+
* If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
|
|
6076
6409
|
*
|
|
6077
|
-
*
|
|
6078
|
-
* * `single` (default)
|
|
6079
|
-
* * `multiple`
|
|
6410
|
+
* @default false
|
|
6080
6411
|
*/
|
|
6081
|
-
this.
|
|
6412
|
+
this.allowReverse = false;
|
|
6082
6413
|
/**
|
|
6083
6414
|
* Sets or gets the `disabled` property of the Calendar and
|
|
6084
6415
|
* determines whether the component is active
|
|
@@ -6163,8 +6494,10 @@ class CalendarComponent {
|
|
|
6163
6494
|
*/
|
|
6164
6495
|
this.valueChange = new EventEmitter();
|
|
6165
6496
|
this._size = DEFAULT_SIZE;
|
|
6497
|
+
this._activeRangeEnd = 'start';
|
|
6166
6498
|
this.isActive = false;
|
|
6167
6499
|
this.cellUID = guid();
|
|
6500
|
+
this.selectionRange = { start: null, end: null };
|
|
6168
6501
|
this.selectedDates = [];
|
|
6169
6502
|
this._min = new Date(MIN_DATE);
|
|
6170
6503
|
this._max = new Date(MAX_DATE);
|
|
@@ -6174,11 +6507,15 @@ class CalendarComponent {
|
|
|
6174
6507
|
this.onValidatorChange = noop$2;
|
|
6175
6508
|
this.minValidateFn = noop$2;
|
|
6176
6509
|
this.maxValidateFn = noop$2;
|
|
6510
|
+
this.changes = {};
|
|
6511
|
+
this.valueSetter = false;
|
|
6512
|
+
this.selectionSetter = false;
|
|
6177
6513
|
this.syncNavigation = true;
|
|
6178
6514
|
this._type = 'infinite';
|
|
6179
6515
|
this.domEvents = [];
|
|
6180
6516
|
this.resolvedPromise = Promise.resolve(null);
|
|
6181
6517
|
this.destroyed = false;
|
|
6518
|
+
this.canHover = false;
|
|
6182
6519
|
validatePackage(packageMetadata);
|
|
6183
6520
|
this.id = `kendo-calendarid-${this.bus.calendarId}`;
|
|
6184
6521
|
this.setClasses(element.nativeElement);
|
|
@@ -6265,29 +6602,37 @@ class CalendarComponent {
|
|
|
6265
6602
|
get max() {
|
|
6266
6603
|
return this._max;
|
|
6267
6604
|
}
|
|
6605
|
+
/**
|
|
6606
|
+
* Sets the Calendar selection mode
|
|
6607
|
+
* ([see example]({% slug multiple_selection_calendar %})).
|
|
6608
|
+
*
|
|
6609
|
+
* The available values are:
|
|
6610
|
+
* * `single` (default)
|
|
6611
|
+
* * `multiple`
|
|
6612
|
+
* * `range`
|
|
6613
|
+
*/
|
|
6614
|
+
set selection(_selection) {
|
|
6615
|
+
this._selection = _selection;
|
|
6616
|
+
this.selectionSetter = true;
|
|
6617
|
+
}
|
|
6618
|
+
get selection() {
|
|
6619
|
+
return this._selection;
|
|
6620
|
+
}
|
|
6268
6621
|
/**
|
|
6269
6622
|
* Sets or gets the `value` property of the Calendar and defines the selected value of the component.
|
|
6270
6623
|
*
|
|
6271
6624
|
* > The `value` has to be a valid
|
|
6272
6625
|
* [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date)
|
|
6273
|
-
* instance when in `single` selection mode
|
|
6626
|
+
* instance when in `single` selection mode, an array of valid JavaScript Date instances when in `multiple` selection mode, or
|
|
6627
|
+
* an object of type `SelectionRange` when in `range` selection mode.
|
|
6274
6628
|
*/
|
|
6629
|
+
set value(candidate) {
|
|
6630
|
+
this.valueSetter = true;
|
|
6631
|
+
this._value = candidate;
|
|
6632
|
+
}
|
|
6275
6633
|
get value() {
|
|
6276
6634
|
return this._value;
|
|
6277
6635
|
}
|
|
6278
|
-
set value(candidate) {
|
|
6279
|
-
this.verifyValue(candidate);
|
|
6280
|
-
this._value = Array.isArray(candidate) ?
|
|
6281
|
-
candidate.filter(date => isPresent(date)).map(element => cloneDate(element)) :
|
|
6282
|
-
cloneDate(candidate);
|
|
6283
|
-
const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
|
|
6284
|
-
if (!areDatesEqual(selection, this.selectedDates)) {
|
|
6285
|
-
const lastSelected = last(selection);
|
|
6286
|
-
this.rangePivot = cloneDate(lastSelected);
|
|
6287
|
-
this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
|
|
6288
|
-
this.selectedDates = selection;
|
|
6289
|
-
}
|
|
6290
|
-
}
|
|
6291
6636
|
/**
|
|
6292
6637
|
* @hidden
|
|
6293
6638
|
*/
|
|
@@ -6468,6 +6813,18 @@ class CalendarComponent {
|
|
|
6468
6813
|
get size() {
|
|
6469
6814
|
return this._size;
|
|
6470
6815
|
}
|
|
6816
|
+
/**
|
|
6817
|
+
* Specify, which end of the defined selection range should be marked as active.
|
|
6818
|
+
*
|
|
6819
|
+
* > Value will be ignored if the selection range is undefined.
|
|
6820
|
+
* > If range selection is used then the default value is 'start'.
|
|
6821
|
+
*/
|
|
6822
|
+
set activeRangeEnd(_activeRangeEnd) {
|
|
6823
|
+
this._activeRangeEnd = _activeRangeEnd;
|
|
6824
|
+
}
|
|
6825
|
+
get activeRangeEnd() {
|
|
6826
|
+
return this._activeRangeEnd;
|
|
6827
|
+
}
|
|
6471
6828
|
get activeViewEnum() {
|
|
6472
6829
|
const activeView = CalendarViewEnum[this.activeView];
|
|
6473
6830
|
return activeView < this.bottomViewEnum ? this.bottomViewEnum : activeView;
|
|
@@ -6500,21 +6857,30 @@ class CalendarComponent {
|
|
|
6500
6857
|
}
|
|
6501
6858
|
}
|
|
6502
6859
|
ngOnChanges(changes) {
|
|
6860
|
+
this.changes = changes;
|
|
6503
6861
|
this.verifyChanges();
|
|
6504
6862
|
this.bus.configure(this.bottomViewEnum, this.topViewEnum);
|
|
6505
6863
|
this.scrollSyncService.configure(this.activeViewEnum);
|
|
6506
|
-
|
|
6507
|
-
|
|
6864
|
+
}
|
|
6865
|
+
ngDoCheck() {
|
|
6866
|
+
if (this.valueSetter || this.selectionSetter) {
|
|
6867
|
+
this.setValue(this.value);
|
|
6868
|
+
this.valueSetter = false;
|
|
6869
|
+
this.selectionSetter = false;
|
|
6870
|
+
}
|
|
6871
|
+
if (hasExistingValue(this.changes, 'focusedDate')) {
|
|
6872
|
+
const focusedDate = this.changes.focusedDate.currentValue;
|
|
6508
6873
|
this.focusedDate = dateInRange(focusedDate, this.min, this.max);
|
|
6509
6874
|
}
|
|
6510
|
-
if (changes.navigation) {
|
|
6875
|
+
if (this.changes.navigation) {
|
|
6511
6876
|
this.syncNavigation = true;
|
|
6512
6877
|
}
|
|
6513
|
-
if (changes.min || changes.max || changes.rangeValidation) {
|
|
6878
|
+
if (this.changes.min || this.changes.max || this.changes.rangeValidation) {
|
|
6514
6879
|
this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop$2;
|
|
6515
6880
|
this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop$2;
|
|
6516
6881
|
this.onValidatorChange();
|
|
6517
6882
|
}
|
|
6883
|
+
this.changes = {};
|
|
6518
6884
|
}
|
|
6519
6885
|
ngAfterViewInit() {
|
|
6520
6886
|
this.setAriaActivedescendant();
|
|
@@ -6547,6 +6913,31 @@ class CalendarComponent {
|
|
|
6547
6913
|
}
|
|
6548
6914
|
this.destroyed = true;
|
|
6549
6915
|
}
|
|
6916
|
+
/**
|
|
6917
|
+
* @hidden
|
|
6918
|
+
*/
|
|
6919
|
+
onCellEnter(date) {
|
|
6920
|
+
if (this.selection === 'range' && this.canHover) {
|
|
6921
|
+
this.ngZone.run(() => {
|
|
6922
|
+
if (this.allowReverse) {
|
|
6923
|
+
if (this.activeRangeEnd === 'end' && this.selectionRange.start) {
|
|
6924
|
+
this.selectionRange = { start: this.selectionRange.start, end: date };
|
|
6925
|
+
}
|
|
6926
|
+
if (this.activeRangeEnd === 'start' && this.selectionRange.end) {
|
|
6927
|
+
this.selectionRange = { start: date, end: this.selectionRange.end };
|
|
6928
|
+
}
|
|
6929
|
+
}
|
|
6930
|
+
else {
|
|
6931
|
+
if (this.activeRangeEnd === 'end' && this.selectionRange.start && date >= this.selectionRange.start) {
|
|
6932
|
+
this.selectionRange = { start: this.selectionRange.start, end: date };
|
|
6933
|
+
}
|
|
6934
|
+
if (this.selectionRange.start && date < this.selectionRange.start) {
|
|
6935
|
+
this.selectionRange = { start: this.selectionRange.start, end: null };
|
|
6936
|
+
}
|
|
6937
|
+
}
|
|
6938
|
+
});
|
|
6939
|
+
}
|
|
6940
|
+
}
|
|
6550
6941
|
/**
|
|
6551
6942
|
* @hidden
|
|
6552
6943
|
*/
|
|
@@ -6621,9 +7012,14 @@ class CalendarComponent {
|
|
|
6621
7012
|
/**
|
|
6622
7013
|
* @hidden
|
|
6623
7014
|
*/
|
|
6624
|
-
handleMultiViewCalendarValueChange(
|
|
6625
|
-
|
|
6626
|
-
|
|
7015
|
+
handleMultiViewCalendarValueChange(value, focusedDate) {
|
|
7016
|
+
if (this.selection === 'range') {
|
|
7017
|
+
this.valueChange.emit(value);
|
|
7018
|
+
}
|
|
7019
|
+
else {
|
|
7020
|
+
const selectedDates = (Array.isArray(value) ? value : [value]);
|
|
7021
|
+
this.handleDateChange({ selectedDates, focusedDate });
|
|
7022
|
+
}
|
|
6627
7023
|
}
|
|
6628
7024
|
/**
|
|
6629
7025
|
* @hidden
|
|
@@ -6647,6 +7043,9 @@ class CalendarComponent {
|
|
|
6647
7043
|
if (this.disabledDatesService.isDateDisabled(this.focusedDate)) {
|
|
6648
7044
|
return;
|
|
6649
7045
|
}
|
|
7046
|
+
if (this.selection === 'range') {
|
|
7047
|
+
return;
|
|
7048
|
+
}
|
|
6650
7049
|
this.ngZone.run(() => {
|
|
6651
7050
|
this.selectedDates = availableDates.map(date => cloneDate(date));
|
|
6652
7051
|
this.value = this.parseSelectionToValue(availableDates);
|
|
@@ -6759,8 +7158,13 @@ class CalendarComponent {
|
|
|
6759
7158
|
*/
|
|
6760
7159
|
handleCellClick({ date, modifiers }) {
|
|
6761
7160
|
this.focus();
|
|
6762
|
-
this.
|
|
6763
|
-
|
|
7161
|
+
if (this.selection === 'range') {
|
|
7162
|
+
this.performRangeSelection(date);
|
|
7163
|
+
}
|
|
7164
|
+
else {
|
|
7165
|
+
this.selectionService.lastClicked = date;
|
|
7166
|
+
this.performSelection(date, modifiers);
|
|
7167
|
+
}
|
|
6764
7168
|
}
|
|
6765
7169
|
/**
|
|
6766
7170
|
* @hidden
|
|
@@ -6770,10 +7174,23 @@ class CalendarComponent {
|
|
|
6770
7174
|
return;
|
|
6771
7175
|
}
|
|
6772
7176
|
this.ngZone.run(() => {
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
7177
|
+
var _a, _b;
|
|
7178
|
+
if (this.selection === 'multiple') {
|
|
7179
|
+
this.handleDateChange({
|
|
7180
|
+
selectedDates: dates,
|
|
7181
|
+
focusedDate: last(dates),
|
|
7182
|
+
});
|
|
7183
|
+
}
|
|
7184
|
+
if (this.selection === 'range') {
|
|
7185
|
+
this.canHover = false;
|
|
7186
|
+
this.activeRangeEnd = 'start';
|
|
7187
|
+
const shouldEmitValueChange = ((_a = this.selectionRange.start) === null || _a === void 0 ? void 0 : _a.getTime()) !== dates[0].getTime() ||
|
|
7188
|
+
((_b = this.selectionRange.end) === null || _b === void 0 ? void 0 : _b.getTime()) !== last(dates).getTime();
|
|
7189
|
+
this.value = { start: dates[0], end: last(dates) };
|
|
7190
|
+
if (shouldEmitValueChange) {
|
|
7191
|
+
this.valueChange.emit(this.value);
|
|
7192
|
+
}
|
|
7193
|
+
}
|
|
6777
7194
|
});
|
|
6778
7195
|
}
|
|
6779
7196
|
/**
|
|
@@ -6837,15 +7254,23 @@ class CalendarComponent {
|
|
|
6837
7254
|
if (!isDevMode()) {
|
|
6838
7255
|
return;
|
|
6839
7256
|
}
|
|
6840
|
-
if (this.selection === 'single' && candidate && !(candidate
|
|
6841
|
-
throw new Error(`
|
|
7257
|
+
if (this.selection === 'single' && candidate && !(isNullOrDate(candidate))) {
|
|
7258
|
+
throw new Error(`When using 'single' selection the 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK$4} for possible resolution.`);
|
|
6842
7259
|
}
|
|
6843
|
-
else if (this.selection === 'multiple' && candidate
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
7260
|
+
else if (this.selection === 'multiple' && candidate) {
|
|
7261
|
+
if (Array.isArray(candidate)) {
|
|
7262
|
+
const onlyDates = candidate.every(value => value instanceof Date);
|
|
7263
|
+
if (!onlyDates) {
|
|
7264
|
+
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.`);
|
|
7265
|
+
}
|
|
7266
|
+
}
|
|
7267
|
+
if (Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
|
|
7268
|
+
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.`);
|
|
6847
7269
|
}
|
|
6848
7270
|
}
|
|
7271
|
+
else if (this.selection === 'range' && candidate && !(isNullOrDate(candidate['start']) && isNullOrDate(candidate['end']))) {
|
|
7272
|
+
throw new Error(`The 'value' should be an object with start and end dates. Check ${VALUE_DOC_LINK$4} for possible resolution.`);
|
|
7273
|
+
}
|
|
6849
7274
|
}
|
|
6850
7275
|
bindEvents() {
|
|
6851
7276
|
const element = this.element.nativeElement;
|
|
@@ -6897,12 +7322,17 @@ class CalendarComponent {
|
|
|
6897
7322
|
}
|
|
6898
7323
|
if (args.keyCode === Keys$1.Enter) {
|
|
6899
7324
|
this.selectionService.lastClicked = this.focusedDate;
|
|
6900
|
-
|
|
7325
|
+
if (this.selection !== 'range') {
|
|
7326
|
+
this.performSelection(this.focusedDate, args);
|
|
7327
|
+
}
|
|
7328
|
+
else {
|
|
7329
|
+
this.performRangeSelection(this.focusedDate);
|
|
7330
|
+
}
|
|
6901
7331
|
}
|
|
6902
7332
|
if (args.keyCode === Keys$1.KeyT) {
|
|
6903
7333
|
this.focusToday();
|
|
6904
7334
|
}
|
|
6905
|
-
if (isArrowWithShiftPressed(args)) {
|
|
7335
|
+
if (isArrowWithShiftPressed(args) && this.selection !== 'range') {
|
|
6906
7336
|
args.anyArrow = true;
|
|
6907
7337
|
this.performSelection(this.focusedDate, args);
|
|
6908
7338
|
}
|
|
@@ -6942,6 +7372,81 @@ class CalendarComponent {
|
|
|
6942
7372
|
selection = selection || [];
|
|
6943
7373
|
return this.selection === 'single' ? cloneDate(last(selection)) : selection.map(date => cloneDate(date));
|
|
6944
7374
|
}
|
|
7375
|
+
setValue(candidate) {
|
|
7376
|
+
var _a, _b, _c, _d;
|
|
7377
|
+
this.verifyValue(candidate);
|
|
7378
|
+
if (candidate === null) {
|
|
7379
|
+
this._value = null;
|
|
7380
|
+
this.selectedDates = [];
|
|
7381
|
+
this.selectionRange = { start: null, end: null };
|
|
7382
|
+
}
|
|
7383
|
+
else if (Array.isArray(candidate)) {
|
|
7384
|
+
this.selectionRange = { start: null, end: null };
|
|
7385
|
+
this._value = candidate.filter(date => isPresent(date)).map(element => cloneDate(element));
|
|
7386
|
+
}
|
|
7387
|
+
else if (isObject(candidate) && Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
|
|
7388
|
+
this.selectedDates = [];
|
|
7389
|
+
this.selectionRange = { start: null, end: null };
|
|
7390
|
+
this._value = { start: null, end: null };
|
|
7391
|
+
this._value.start = candidate.start instanceof Date ? cloneDate(candidate.start) : null;
|
|
7392
|
+
this._value.end = candidate.end instanceof Date ? cloneDate(candidate.end) : null;
|
|
7393
|
+
this.selectionRange = Object.assign({}, this._value);
|
|
7394
|
+
if (((_a = this._value) === null || _a === void 0 ? void 0 : _a.start) && !((_b = this._value) === null || _b === void 0 ? void 0 : _b.end)) {
|
|
7395
|
+
this.activeRangeEnd = 'end';
|
|
7396
|
+
this.canHover = true;
|
|
7397
|
+
}
|
|
7398
|
+
if (((_c = this._value) === null || _c === void 0 ? void 0 : _c.end) && !((_d = this._value) === null || _d === void 0 ? void 0 : _d.start)) {
|
|
7399
|
+
this.activeRangeEnd = 'start';
|
|
7400
|
+
this.canHover = true;
|
|
7401
|
+
}
|
|
7402
|
+
if (this.activeRangeEnd === 'end') {
|
|
7403
|
+
this.focusedDate = this.selectionRange.start || this.selectionRange.end || getToday();
|
|
7404
|
+
}
|
|
7405
|
+
else {
|
|
7406
|
+
this.focusedDate = this.selectionRange.end || this.selectionRange.start || getToday();
|
|
7407
|
+
}
|
|
7408
|
+
}
|
|
7409
|
+
else {
|
|
7410
|
+
this.selectionRange = { start: null, end: null };
|
|
7411
|
+
this._value = cloneDate(candidate);
|
|
7412
|
+
}
|
|
7413
|
+
if (this.selection !== 'range') {
|
|
7414
|
+
const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
|
|
7415
|
+
if (!areDatesEqual(selection, this.selectedDates)) {
|
|
7416
|
+
const lastSelected = last(selection);
|
|
7417
|
+
this.rangePivot = cloneDate(lastSelected);
|
|
7418
|
+
this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
|
|
7419
|
+
this.selectedDates = selection;
|
|
7420
|
+
}
|
|
7421
|
+
}
|
|
7422
|
+
}
|
|
7423
|
+
performRangeSelection(date) {
|
|
7424
|
+
var _a, _b, _c, _d;
|
|
7425
|
+
const clonedRangeSelection = Object.assign({}, this.selectionRange);
|
|
7426
|
+
const emitValueChange = (this.activeRangeEnd === 'start' && ((_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.start) === null || _b === void 0 ? void 0 : _b.getTime()) !== (date === null || date === void 0 ? void 0 : date.getTime())) ||
|
|
7427
|
+
(this.activeRangeEnd === 'end' && ((_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.end) === null || _d === void 0 ? void 0 : _d.getTime()) !== (date === null || date === void 0 ? void 0 : date.getTime()));
|
|
7428
|
+
this.ngZone.run(() => {
|
|
7429
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
7430
|
+
const rangeSelection = handleRangeSelection(date, clonedRangeSelection, this.activeRangeEnd, this.allowReverse);
|
|
7431
|
+
this.activeRangeEnd = rangeSelection.activeRangeEnd;
|
|
7432
|
+
if (this.canHover && rangeSelection.activeRangeEnd === 'end' && ((_a = rangeSelection.selectionRange.end) === null || _a === void 0 ? void 0 : _a.getTime()) === date.getTime()) {
|
|
7433
|
+
this.activeRangeEnd = 'start';
|
|
7434
|
+
}
|
|
7435
|
+
if ((this.activeRangeEnd === 'end' && rangeSelection.selectionRange.start) ||
|
|
7436
|
+
(this.activeRangeEnd === 'start' && rangeSelection.selectionRange.end)) {
|
|
7437
|
+
this.canHover = true;
|
|
7438
|
+
}
|
|
7439
|
+
else {
|
|
7440
|
+
this.canHover = false;
|
|
7441
|
+
}
|
|
7442
|
+
if (emitValueChange && (((_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.start) === null || _c === void 0 ? void 0 : _c.getTime()) !== ((_e = (_d = rangeSelection.selectionRange) === null || _d === void 0 ? void 0 : _d.start) === null || _e === void 0 ? void 0 : _e.getTime()) ||
|
|
7443
|
+
((_g = (_f = this.value) === null || _f === void 0 ? void 0 : _f.end) === null || _g === void 0 ? void 0 : _g.getTime()) !== ((_j = (_h = rangeSelection.selectionRange) === null || _h === void 0 ? void 0 : _h.end) === null || _j === void 0 ? void 0 : _j.getTime()))) {
|
|
7444
|
+
this.value = rangeSelection.selectionRange;
|
|
7445
|
+
this.valueChange.emit(this.value);
|
|
7446
|
+
}
|
|
7447
|
+
this.cdr.markForCheck();
|
|
7448
|
+
});
|
|
7449
|
+
}
|
|
6945
7450
|
performSelection(date, selectionModifiers) {
|
|
6946
7451
|
const selection = this.selectionService.performSelection({
|
|
6947
7452
|
date: date,
|
|
@@ -6959,7 +7464,7 @@ class CalendarComponent {
|
|
|
6959
7464
|
}
|
|
6960
7465
|
}
|
|
6961
7466
|
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 });
|
|
6962
|
-
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: [
|
|
7467
|
+
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: [
|
|
6963
7468
|
BusViewService,
|
|
6964
7469
|
CALENDAR_VALUE_ACCESSOR,
|
|
6965
7470
|
CALENDAR_RANGE_VALIDATORS,
|
|
@@ -7002,7 +7507,10 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
7002
7507
|
</kendo-calendar-navigation>
|
|
7003
7508
|
<kendo-calendar-viewlist
|
|
7004
7509
|
[activeView]="activeViewEnum"
|
|
7510
|
+
[allowReverse]="allowReverse"
|
|
7005
7511
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
7512
|
+
[activeRangeEnd]="activeRangeEnd"
|
|
7513
|
+
[selectionRange]="selectionRange"
|
|
7006
7514
|
[isActive]="isActive"
|
|
7007
7515
|
[id]="headerId"
|
|
7008
7516
|
[weekDaysFormat]="weekDaysFormat"
|
|
@@ -7030,6 +7538,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
7030
7538
|
(pageChange)="onPageChange()"
|
|
7031
7539
|
(focusCalendar)="handleFocus()"
|
|
7032
7540
|
(blurCalendar)="handleBlur($event)"
|
|
7541
|
+
(cellEnter)="onCellEnter($event)"
|
|
7033
7542
|
>
|
|
7034
7543
|
</kendo-calendar-viewlist>
|
|
7035
7544
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
@@ -7041,6 +7550,9 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
7041
7550
|
[min]="min"
|
|
7042
7551
|
[max]="max"
|
|
7043
7552
|
[id]="id"
|
|
7553
|
+
[activeRangeEnd]="activeRangeEnd"
|
|
7554
|
+
[selectionRange]="selectionRange"
|
|
7555
|
+
[allowReverse]="allowReverse"
|
|
7044
7556
|
[disabled]="disabled"
|
|
7045
7557
|
[isActive]="isActive"
|
|
7046
7558
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
@@ -7082,7 +7594,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
7082
7594
|
</kendo-multiviewcalendar-messages>
|
|
7083
7595
|
</kendo-multiviewcalendar>
|
|
7084
7596
|
</ng-container>
|
|
7085
|
-
`, 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 });
|
|
7597
|
+
`, 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 });
|
|
7086
7598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
7087
7599
|
type: Component,
|
|
7088
7600
|
args: [{
|
|
@@ -7133,7 +7645,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
7133
7645
|
</kendo-calendar-navigation>
|
|
7134
7646
|
<kendo-calendar-viewlist
|
|
7135
7647
|
[activeView]="activeViewEnum"
|
|
7648
|
+
[allowReverse]="allowReverse"
|
|
7136
7649
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
7650
|
+
[activeRangeEnd]="activeRangeEnd"
|
|
7651
|
+
[selectionRange]="selectionRange"
|
|
7137
7652
|
[isActive]="isActive"
|
|
7138
7653
|
[id]="headerId"
|
|
7139
7654
|
[weekDaysFormat]="weekDaysFormat"
|
|
@@ -7161,6 +7676,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
7161
7676
|
(pageChange)="onPageChange()"
|
|
7162
7677
|
(focusCalendar)="handleFocus()"
|
|
7163
7678
|
(blurCalendar)="handleBlur($event)"
|
|
7679
|
+
(cellEnter)="onCellEnter($event)"
|
|
7164
7680
|
>
|
|
7165
7681
|
</kendo-calendar-viewlist>
|
|
7166
7682
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
@@ -7172,6 +7688,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
7172
7688
|
[min]="min"
|
|
7173
7689
|
[max]="max"
|
|
7174
7690
|
[id]="id"
|
|
7691
|
+
[activeRangeEnd]="activeRangeEnd"
|
|
7692
|
+
[selectionRange]="selectionRange"
|
|
7693
|
+
[allowReverse]="allowReverse"
|
|
7175
7694
|
[disabled]="disabled"
|
|
7176
7695
|
[isActive]="isActive"
|
|
7177
7696
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
@@ -7237,6 +7756,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
7237
7756
|
type: Input
|
|
7238
7757
|
}], selection: [{
|
|
7239
7758
|
type: Input
|
|
7759
|
+
}], allowReverse: [{
|
|
7760
|
+
type: Input
|
|
7240
7761
|
}], value: [{
|
|
7241
7762
|
type: Input
|
|
7242
7763
|
}], disabled: [{
|
|
@@ -7340,6 +7861,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
7340
7861
|
args: ['navigationItemTemplate']
|
|
7341
7862
|
}], size: [{
|
|
7342
7863
|
type: Input
|
|
7864
|
+
}], activeRangeEnd: [{
|
|
7865
|
+
type: Input
|
|
7343
7866
|
}], navigationView: [{
|
|
7344
7867
|
type: ViewChild,
|
|
7345
7868
|
args: [NavigationComponent, { static: false }]
|
|
@@ -9874,7 +10397,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
9874
10397
|
</kendo-calendar-messages>
|
|
9875
10398
|
</kendo-calendar>
|
|
9876
10399
|
</ng-template>
|
|
9877
|
-
`, 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 });
|
|
10400
|
+
`, 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 });
|
|
9878
10401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
9879
10402
|
type: Component,
|
|
9880
10403
|
args: [{
|
|
@@ -15318,7 +15841,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
15318
15841
|
</div>
|
|
15319
15842
|
</div>
|
|
15320
15843
|
</ng-template>
|
|
15321
|
-
`, 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 });
|
|
15844
|
+
`, 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 });
|
|
15322
15845
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
15323
15846
|
type: Component,
|
|
15324
15847
|
args: [{
|
|
@@ -16382,6 +16905,13 @@ class DateRangePopupComponent {
|
|
|
16382
16905
|
this.localization = localization;
|
|
16383
16906
|
this.cdr = cdr;
|
|
16384
16907
|
this.rtl = rtl;
|
|
16908
|
+
/**
|
|
16909
|
+
* Allows reverse selection when using `range` selection.
|
|
16910
|
+
* If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
|
|
16911
|
+
*
|
|
16912
|
+
* @default false
|
|
16913
|
+
*/
|
|
16914
|
+
this.allowReverse = false;
|
|
16385
16915
|
/**
|
|
16386
16916
|
* Controls the popup animation.
|
|
16387
16917
|
* By default, the opening and closing animations are enabled.
|
|
@@ -16520,6 +17050,7 @@ class DateRangePopupComponent {
|
|
|
16520
17050
|
}
|
|
16521
17051
|
}
|
|
16522
17052
|
ngAfterViewInit() {
|
|
17053
|
+
var _a, _b;
|
|
16523
17054
|
this.calendarSubscriptions.add(this.contentCalendar.changes.subscribe((changes) => {
|
|
16524
17055
|
var _a;
|
|
16525
17056
|
this.calendar = changes.first;
|
|
@@ -16532,6 +17063,14 @@ class DateRangePopupComponent {
|
|
|
16532
17063
|
this.actionSheet.titleId = (_a = changes.first) === null || _a === void 0 ? void 0 : _a.headerId;
|
|
16533
17064
|
this.cdr.detectChanges();
|
|
16534
17065
|
}));
|
|
17066
|
+
this.calendarSubscriptions.add((_b = (_a = this.dateRangeService.startInput$) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.valueChange.subscribe((res) => {
|
|
17067
|
+
if (!res && this.dateRangeService.selectionRange.end) {
|
|
17068
|
+
this.calendar.shouldHoverWhenNoStart = true;
|
|
17069
|
+
}
|
|
17070
|
+
else {
|
|
17071
|
+
this.calendar.shouldHoverWhenNoStart = false;
|
|
17072
|
+
}
|
|
17073
|
+
}));
|
|
16535
17074
|
if (isWindowAvailable()) {
|
|
16536
17075
|
this.zone.runOutsideAngular(() => this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this)));
|
|
16537
17076
|
}
|
|
@@ -16555,6 +17094,19 @@ class DateRangePopupComponent {
|
|
|
16555
17094
|
this.windowBlurSubscription.unsubscribe();
|
|
16556
17095
|
}
|
|
16557
17096
|
}
|
|
17097
|
+
/**
|
|
17098
|
+
* @hidden
|
|
17099
|
+
*
|
|
17100
|
+
*/
|
|
17101
|
+
onRangeSelectionChange(rangeSelection) {
|
|
17102
|
+
this.dateRangeService.setActiveRangeEnd(rangeSelection.activeRangeEnd);
|
|
17103
|
+
if (!this.isAdaptive) {
|
|
17104
|
+
this.dateRangeService.setRange(rangeSelection.selectionRange);
|
|
17105
|
+
}
|
|
17106
|
+
else {
|
|
17107
|
+
this._rangeSelection = rangeSelection.selectionRange;
|
|
17108
|
+
}
|
|
17109
|
+
}
|
|
16558
17110
|
/**
|
|
16559
17111
|
* Opens the popup component and focuses the calendar.
|
|
16560
17112
|
*/
|
|
@@ -16622,7 +17174,7 @@ class DateRangePopupComponent {
|
|
|
16622
17174
|
* @hidden
|
|
16623
17175
|
*/
|
|
16624
17176
|
handleAccept() {
|
|
16625
|
-
this.
|
|
17177
|
+
this.dateRangeService.setRange(this._rangeSelection);
|
|
16626
17178
|
this.show = false;
|
|
16627
17179
|
}
|
|
16628
17180
|
/**
|
|
@@ -16802,7 +17354,7 @@ class DateRangePopupComponent {
|
|
|
16802
17354
|
}
|
|
16803
17355
|
}
|
|
16804
17356
|
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 });
|
|
16805
|
-
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: [
|
|
17357
|
+
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: [
|
|
16806
17358
|
LocalizationService,
|
|
16807
17359
|
{
|
|
16808
17360
|
provide: L10N_PREFIX,
|
|
@@ -16825,7 +17377,15 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
16825
17377
|
</ng-container>
|
|
16826
17378
|
<ng-container #container></ng-container>
|
|
16827
17379
|
<ng-template #defaultTemplate>
|
|
16828
|
-
<kendo-multiviewcalendar
|
|
17380
|
+
<kendo-multiviewcalendar
|
|
17381
|
+
[allowReverse]="allowReverse"
|
|
17382
|
+
selection="range"
|
|
17383
|
+
[value]="dateRangeService.selectionRange"
|
|
17384
|
+
(onClosePopup)="closePopup($event)"
|
|
17385
|
+
(onTabPress)="handleTab($event)"
|
|
17386
|
+
(onShiftTabPress)="handleShiftTab($event)"
|
|
17387
|
+
(rangeSelectionChange)="onRangeSelectionChange($event)"
|
|
17388
|
+
></kendo-multiviewcalendar>
|
|
16829
17389
|
</ng-template>
|
|
16830
17390
|
|
|
16831
17391
|
<kendo-actionsheet
|
|
@@ -16866,8 +17426,12 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
16866
17426
|
<kendo-multiviewcalendar
|
|
16867
17427
|
class="k-calendar-lg"
|
|
16868
17428
|
orientation="vertical"
|
|
16869
|
-
|
|
16870
|
-
[
|
|
17429
|
+
[allowReverse]="allowReverse"
|
|
17430
|
+
[focusedDate]="dateRangeService.focusedDate"
|
|
17431
|
+
[value]="dateRangeService.selectionRange"
|
|
17432
|
+
selection="range"
|
|
17433
|
+
(rangeSelectionChange)="onRangeSelectionChange($event)"
|
|
17434
|
+
>
|
|
16871
17435
|
</kendo-multiviewcalendar>
|
|
16872
17436
|
</div>
|
|
16873
17437
|
</div>
|
|
@@ -16895,7 +17459,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
16895
17459
|
</div>
|
|
16896
17460
|
</ng-template>
|
|
16897
17461
|
</kendo-actionsheet>
|
|
16898
|
-
`, 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:
|
|
17462
|
+
`, 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]" }] });
|
|
16899
17463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateRangePopupComponent, decorators: [{
|
|
16900
17464
|
type: Component,
|
|
16901
17465
|
args: [{
|
|
@@ -16925,7 +17489,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
16925
17489
|
</ng-container>
|
|
16926
17490
|
<ng-container #container></ng-container>
|
|
16927
17491
|
<ng-template #defaultTemplate>
|
|
16928
|
-
<kendo-multiviewcalendar
|
|
17492
|
+
<kendo-multiviewcalendar
|
|
17493
|
+
[allowReverse]="allowReverse"
|
|
17494
|
+
selection="range"
|
|
17495
|
+
[value]="dateRangeService.selectionRange"
|
|
17496
|
+
(onClosePopup)="closePopup($event)"
|
|
17497
|
+
(onTabPress)="handleTab($event)"
|
|
17498
|
+
(onShiftTabPress)="handleShiftTab($event)"
|
|
17499
|
+
(rangeSelectionChange)="onRangeSelectionChange($event)"
|
|
17500
|
+
></kendo-multiviewcalendar>
|
|
16929
17501
|
</ng-template>
|
|
16930
17502
|
|
|
16931
17503
|
<kendo-actionsheet
|
|
@@ -16966,8 +17538,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
16966
17538
|
<kendo-multiviewcalendar
|
|
16967
17539
|
class="k-calendar-lg"
|
|
16968
17540
|
orientation="vertical"
|
|
16969
|
-
|
|
16970
|
-
[
|
|
17541
|
+
[allowReverse]="allowReverse"
|
|
17542
|
+
[focusedDate]="dateRangeService.focusedDate"
|
|
17543
|
+
[value]="dateRangeService.selectionRange"
|
|
17544
|
+
selection="range"
|
|
17545
|
+
(rangeSelectionChange)="onRangeSelectionChange($event)"
|
|
17546
|
+
>
|
|
16971
17547
|
</kendo-multiviewcalendar>
|
|
16972
17548
|
</div>
|
|
16973
17549
|
</div>
|
|
@@ -17025,6 +17601,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
17025
17601
|
}], contentCalendar: [{
|
|
17026
17602
|
type: ContentChildren,
|
|
17027
17603
|
args: [MultiViewCalendarComponent]
|
|
17604
|
+
}], allowReverse: [{
|
|
17605
|
+
type: Input
|
|
17028
17606
|
}], animate: [{
|
|
17029
17607
|
type: Input
|
|
17030
17608
|
}], anchor: [{
|
|
@@ -17119,7 +17697,7 @@ DateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", versi
|
|
|
17119
17697
|
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: `
|
|
17120
17698
|
<ng-content></ng-content>
|
|
17121
17699
|
<kendo-daterange-popup *ngIf="showDefault"></kendo-daterange-popup>
|
|
17122
|
-
`, 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"] }] });
|
|
17700
|
+
`, 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"] }] });
|
|
17123
17701
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: DateRangeComponent, decorators: [{
|
|
17124
17702
|
type: Component,
|
|
17125
17703
|
args: [{
|