@progress/kendo-angular-dateinputs 21.4.1 → 22.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/calendar/localization/calendar-messages.d.ts +1 -1
  2. package/calendar/localization/multiview-calendar-messages.d.ts +1 -1
  3. package/dateinput/localization/messages.d.ts +1 -1
  4. package/datepicker/localization/messages.d.ts +1 -1
  5. package/daterange/date-range-input.d.ts +1 -1
  6. package/daterange/localization/messages.d.ts +1 -1
  7. package/datetimepicker/localization/messages.d.ts +1 -1
  8. package/fesm2022/progress-kendo-angular-dateinputs.mjs +262 -262
  9. package/package.json +15 -23
  10. package/timepicker/localization/messages.d.ts +1 -1
  11. package/esm2022/calendar/calendar.component.mjs +0 -1711
  12. package/esm2022/calendar/calendar.module.mjs +0 -91
  13. package/esm2022/calendar/calendars.module.mjs +0 -87
  14. package/esm2022/calendar/footer.component.mjs +0 -77
  15. package/esm2022/calendar/for.directive.mjs +0 -116
  16. package/esm2022/calendar/header.component.mjs +0 -367
  17. package/esm2022/calendar/horizontal-view-list.component.mjs +0 -580
  18. package/esm2022/calendar/localization/calendar-custom-messages.component.mjs +0 -51
  19. package/esm2022/calendar/localization/calendar-localized-messages.directive.mjs +0 -39
  20. package/esm2022/calendar/localization/calendar-messages.mjs +0 -45
  21. package/esm2022/calendar/localization/multiview-calendar-custom-messages.component.mjs +0 -51
  22. package/esm2022/calendar/localization/multiview-calendar-localized-messages.directive.mjs +0 -39
  23. package/esm2022/calendar/localization/multiview-calendar-messages.mjs +0 -45
  24. package/esm2022/calendar/models/cell-context.interface.mjs +0 -5
  25. package/esm2022/calendar/models/navigation-action.enum.mjs +0 -20
  26. package/esm2022/calendar/models/orientation.mjs +0 -5
  27. package/esm2022/calendar/models/row-length-options.interface.mjs +0 -5
  28. package/esm2022/calendar/models/scrollable.interface.mjs +0 -5
  29. package/esm2022/calendar/models/selection-range-end.type.mjs +0 -5
  30. package/esm2022/calendar/models/selection-range.interface.mjs +0 -10
  31. package/esm2022/calendar/models/selection.mjs +0 -50
  32. package/esm2022/calendar/models/type.mjs +0 -5
  33. package/esm2022/calendar/models/view-service.interface.mjs +0 -5
  34. package/esm2022/calendar/models/view.enum.mjs +0 -16
  35. package/esm2022/calendar/models/view.type.mjs +0 -5
  36. package/esm2022/calendar/multiview-calendar.component.mjs +0 -1564
  37. package/esm2022/calendar/multiview-calendar.module.mjs +0 -89
  38. package/esm2022/calendar/navigation.component.mjs +0 -230
  39. package/esm2022/calendar/services/bus-view.service.mjs +0 -83
  40. package/esm2022/calendar/services/century-view.service.mjs +0 -219
  41. package/esm2022/calendar/services/decade-view.service.mjs +0 -217
  42. package/esm2022/calendar/services/disabled-dates.service.mjs +0 -66
  43. package/esm2022/calendar/services/dom.service.mjs +0 -203
  44. package/esm2022/calendar/services/month-view.service.mjs +0 -223
  45. package/esm2022/calendar/services/navigation.service.mjs +0 -60
  46. package/esm2022/calendar/services/scroll-sync.service.mjs +0 -89
  47. package/esm2022/calendar/services/selection.service.mjs +0 -62
  48. package/esm2022/calendar/services/weeknames.service.mjs +0 -33
  49. package/esm2022/calendar/services/year-view.service.mjs +0 -204
  50. package/esm2022/calendar/templates/cell-template.directive.mjs +0 -45
  51. package/esm2022/calendar/templates/century-cell-template.directive.mjs +0 -43
  52. package/esm2022/calendar/templates/decade-cell-template.directive.mjs +0 -43
  53. package/esm2022/calendar/templates/footer-template.directive.mjs +0 -44
  54. package/esm2022/calendar/templates/header-template.directive.mjs +0 -47
  55. package/esm2022/calendar/templates/header-title-template.directive.mjs +0 -43
  56. package/esm2022/calendar/templates/month-cell-template.directive.mjs +0 -43
  57. package/esm2022/calendar/templates/navigation-item-template.directive.mjs +0 -43
  58. package/esm2022/calendar/templates/weeknumber-cell-template.directive.mjs +0 -43
  59. package/esm2022/calendar/templates/year-cell-template.directive.mjs +0 -43
  60. package/esm2022/calendar/view-list.component.mjs +0 -497
  61. package/esm2022/calendar/view.component.mjs +0 -432
  62. package/esm2022/common/dom-queries.mjs +0 -24
  63. package/esm2022/common/models/fillmode.mjs +0 -5
  64. package/esm2022/common/models/rounded.mjs +0 -5
  65. package/esm2022/common/models/size.mjs +0 -5
  66. package/esm2022/common/models/week-days-format.mjs +0 -5
  67. package/esm2022/common/picker.service.mjs +0 -17
  68. package/esm2022/common/utils.mjs +0 -70
  69. package/esm2022/dateinput/arrow.enum.mjs +0 -13
  70. package/esm2022/dateinput/dateinput.component.mjs +0 -1196
  71. package/esm2022/dateinput/dateinput.module.mjs +0 -45
  72. package/esm2022/dateinput/localization/dateinput-custom-messages.component.mjs +0 -60
  73. package/esm2022/dateinput/localization/dateinput-localized-messages.directive.mjs +0 -39
  74. package/esm2022/dateinput/localization/messages.mjs +0 -39
  75. package/esm2022/dateinput/models/format-placeholder.model.mjs +0 -5
  76. package/esm2022/dateinput/models/format-settings.model.mjs +0 -5
  77. package/esm2022/dateinput/models/incremental-steps.model.mjs +0 -5
  78. package/esm2022/dateinputs.module.mjs +0 -136
  79. package/esm2022/datepicker/datepicker.component.mjs +0 -1758
  80. package/esm2022/datepicker/datepicker.module.mjs +0 -83
  81. package/esm2022/datepicker/localization/datepicker-custom-messages.component.mjs +0 -53
  82. package/esm2022/datepicker/localization/datepicker-localized-messages.directive.mjs +0 -39
  83. package/esm2022/datepicker/localization/messages.mjs +0 -63
  84. package/esm2022/daterange/auto-correct-on.type.mjs +0 -5
  85. package/esm2022/daterange/date-range-end-input.directive.mjs +0 -105
  86. package/esm2022/daterange/date-range-input.mjs +0 -138
  87. package/esm2022/daterange/date-range-popup-template.directive.mjs +0 -36
  88. package/esm2022/daterange/date-range-popup.component.mjs +0 -1051
  89. package/esm2022/daterange/date-range-selection.directive.mjs +0 -223
  90. package/esm2022/daterange/date-range-start-input.directive.mjs +0 -109
  91. package/esm2022/daterange/date-range.component.mjs +0 -116
  92. package/esm2022/daterange/date-range.module.mjs +0 -103
  93. package/esm2022/daterange/date-range.service.mjs +0 -225
  94. package/esm2022/daterange/localization/daterange-popup-custom-messages.component.mjs +0 -43
  95. package/esm2022/daterange/localization/daterange-popup-localized-messages.directive.mjs +0 -39
  96. package/esm2022/daterange/localization/messages.mjs +0 -51
  97. package/esm2022/datetimepicker/datetimepicker.component.mjs +0 -2505
  98. package/esm2022/datetimepicker/datetimepicker.module.mjs +0 -106
  99. package/esm2022/datetimepicker/localization/datetimepicker-custom-messages.component.mjs +0 -52
  100. package/esm2022/datetimepicker/localization/localized-messages.directive.mjs +0 -39
  101. package/esm2022/datetimepicker/localization/messages.mjs +0 -153
  102. package/esm2022/datetimepicker/models/active-tab.type.mjs +0 -5
  103. package/esm2022/defaults.mjs +0 -24
  104. package/esm2022/directives.mjs +0 -146
  105. package/esm2022/index.mjs +0 -78
  106. package/esm2022/package-metadata.mjs +0 -16
  107. package/esm2022/popup-settings.model.mjs +0 -5
  108. package/esm2022/preventable-event.mjs +0 -27
  109. package/esm2022/progress-kendo-angular-dateinputs.mjs +0 -8
  110. package/esm2022/timepicker/localization/messages.mjs +0 -105
  111. package/esm2022/timepicker/localization/timepicker-custom-messages.component.mjs +0 -54
  112. package/esm2022/timepicker/localization/timepicker-localized-messages.directive.mjs +0 -39
  113. package/esm2022/timepicker/localization/timeselector-custom-messages.component.mjs +0 -45
  114. package/esm2022/timepicker/localization/timeselector-localized-messages.directive.mjs +0 -39
  115. package/esm2022/timepicker/models/incremental-steps.model.mjs +0 -5
  116. package/esm2022/timepicker/models/list-item.interface.mjs +0 -5
  117. package/esm2022/timepicker/models/list-service-settings.mjs +0 -5
  118. package/esm2022/timepicker/models/list-service.interface.mjs +0 -5
  119. package/esm2022/timepicker/models/time-part.default.mjs +0 -14
  120. package/esm2022/timepicker/services/dayperiod.service.mjs +0 -131
  121. package/esm2022/timepicker/services/dom.service.mjs +0 -126
  122. package/esm2022/timepicker/services/hours.service.mjs +0 -130
  123. package/esm2022/timepicker/services/milliseconds.service.mjs +0 -131
  124. package/esm2022/timepicker/services/minutes.service.mjs +0 -128
  125. package/esm2022/timepicker/services/seconds.service.mjs +0 -128
  126. package/esm2022/timepicker/timelist.component.mjs +0 -388
  127. package/esm2022/timepicker/timepicker.component.mjs +0 -1598
  128. package/esm2022/timepicker/timepicker.module.mjs +0 -71
  129. package/esm2022/timepicker/timeselector.component.mjs +0 -728
  130. package/esm2022/timepicker/util.mjs +0 -70
  131. package/esm2022/util.mjs +0 -406
  132. package/esm2022/validators/disabled-date.validator.mjs +0 -18
  133. package/esm2022/validators/disabled-dates-range.validator.mjs +0 -26
  134. package/esm2022/validators/incomplete-date.validator.mjs +0 -18
  135. package/esm2022/validators/max.validator.mjs +0 -21
  136. package/esm2022/validators/min.validator.mjs +0 -21
  137. package/esm2022/validators/time-range.validator.mjs +0 -23
  138. package/esm2022/virtualization/models/scrollable.interface.mjs +0 -5
  139. package/esm2022/virtualization/services/row-height.service.mjs +0 -73
  140. package/esm2022/virtualization/services/scroller.service.mjs +0 -109
  141. package/esm2022/virtualization/virtualization.component.mjs +0 -324
@@ -1,1564 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, EventEmitter, ElementRef, Renderer2, isDevMode, forwardRef, HostBinding, HostListener, Input, Output, ViewChild, NgZone } from '@angular/core';
6
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
7
- import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
8
- import { cloneDate, isEqual } from '@progress/kendo-date-math';
9
- import { hasObservers, guid, Keys, isObject, normalizeKeys } from '@progress/kendo-angular-common';
10
- import { HorizontalViewListComponent } from './horizontal-view-list.component';
11
- import { HeaderComponent } from './header.component';
12
- import { BusViewService } from './services/bus-view.service';
13
- import { SelectionService } from './services/selection.service';
14
- import { DisabledDatesService } from './services/disabled-dates.service';
15
- import { CellTemplateDirective } from './templates/cell-template.directive';
16
- import { MonthCellTemplateDirective } from './templates/month-cell-template.directive';
17
- import { YearCellTemplateDirective } from './templates/year-cell-template.directive';
18
- import { DecadeCellTemplateDirective } from './templates/decade-cell-template.directive';
19
- import { CenturyCellTemplateDirective } from './templates/century-cell-template.directive';
20
- import { WeekNumberCellTemplateDirective } from './templates/weeknumber-cell-template.directive';
21
- import { HeaderTitleTemplateDirective } from './templates/header-title-template.directive';
22
- import { Action } from './models/navigation-action.enum';
23
- import { CalendarViewEnum } from './models/view.enum';
24
- import { handleRangeSelection } from './models/selection';
25
- import { minValidator } from '../validators/min.validator';
26
- import { maxValidator } from '../validators/max.validator';
27
- import { disabledDatesRangeValidator } from '../validators/disabled-dates-range.validator';
28
- import { MIN_DATE, MAX_DATE } from '../defaults';
29
- import { DEFAULT_SIZE, areDatesEqual, dateInRange, getSizeClass, getToday, hasExistingValue, last, noop } from '../util';
30
- import { Subscription } from 'rxjs';
31
- import { isArrowWithShiftPressed, isNullOrDate, isPresent } from '../common/utils';
32
- import { NavigationService } from './services/navigation.service';
33
- import { HeaderTemplateDirective } from './templates/header-template.directive';
34
- import { FooterTemplateDirective } from './templates/footer-template.directive';
35
- import { FooterComponent } from './footer.component';
36
- import { MultiViewCalendarLocalizedMessagesDirective } from './localization/multiview-calendar-localized-messages.directive';
37
- import * as i0 from "@angular/core";
38
- import * as i1 from "./services/bus-view.service";
39
- import * as i2 from "./services/navigation.service";
40
- import * as i3 from "./services/disabled-dates.service";
41
- import * as i4 from "./services/selection.service";
42
- const BOTTOM_VIEW_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
43
- const TOP_VIEW_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
44
- const MIN_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
45
- const MAX_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-max';
46
- const VALUE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/calendar/#toc-using-with-json';
47
- /**
48
- * @hidden
49
- */
50
- export const RANGE_CALENDAR_VALUE_ACCESSOR = {
51
- multi: true,
52
- provide: NG_VALUE_ACCESSOR,
53
- useExisting: forwardRef(() => MultiViewCalendarComponent)
54
- };
55
- /**
56
- * @hidden
57
- */
58
- export const RANGE_CALENDAR_RANGE_VALIDATORS = {
59
- multi: true,
60
- provide: NG_VALIDATORS,
61
- useExisting: forwardRef(() => MultiViewCalendarComponent)
62
- };
63
- /**
64
- * Represents the Kendo UI MultiViewCalendar component for Angular.
65
- * @example
66
- * ```html
67
- * <kendo-multiviewcalendar> </kendo-multiviewcalendar>
68
- * ```
69
- *
70
- * @remarks
71
- * Supported children components are: {@link MultiViewCalendarCustomMessagesComponent}.
72
- */
73
- export class MultiViewCalendarComponent {
74
- bus;
75
- element;
76
- navigator;
77
- renderer;
78
- cdr;
79
- zone;
80
- disabledDatesService;
81
- selectionService;
82
- /**
83
- * Shows days that fall outside the current month ([see example]({% slug viewoptions_multiviewcalendar %}#toc-displaying-other-month-days)).
84
- *
85
- * @default true
86
- */
87
- showOtherMonthDays = true;
88
- /**
89
- * @hidden
90
- *
91
- * Determines whether to display the calendar header.
92
- */
93
- showCalendarHeader = true;
94
- /**
95
- * @hidden
96
- *
97
- * TODO: Make visible when the Infinite Calendar is fixed to set properly the size option.
98
- * Sets the size of the component.
99
- *
100
- * The possible values are:
101
- * * `small`
102
- * * `medium` (Default)
103
- * * `large`
104
- * * `none`
105
- *
106
- */
107
- set size(size) {
108
- const newSize = size ? size : DEFAULT_SIZE;
109
- this.renderer.removeClass(this.element.nativeElement, getSizeClass('calendar', this.size));
110
- if (newSize !== 'none') {
111
- this.renderer.addClass(this.element.nativeElement, getSizeClass('calendar', newSize));
112
- }
113
- this._size = newSize;
114
- }
115
- get size() {
116
- return this._size;
117
- }
118
- _size = DEFAULT_SIZE;
119
- /**
120
- * @hidden
121
- */
122
- id;
123
- /**
124
- * Specifies the focused date of the Calendar
125
- * ([see example]({% slug dates_multiviewcalendar %}#toc-focused-dates)).
126
- *
127
- * If the Calendar is outside the `min` or `max` range, the component normalizes the defined `focusedDate`.
128
- */
129
- set focusedDate(focusedDate) {
130
- this._focusedDate = focusedDate || getToday();
131
- }
132
- get focusedDate() {
133
- return this._focusedDate;
134
- }
135
- /**
136
- * Toggles the visibility of the footer.
137
- *
138
- * @default false
139
- */
140
- footer = false;
141
- /**
142
- * @hidden
143
- */
144
- get headerId() {
145
- return this.id + 'header-';
146
- }
147
- /**
148
- * @hidden
149
- */
150
- get multiViewCalendarHeaderIdLabel() {
151
- return this.views >= 2 ? this.id + 'header-' : null;
152
- }
153
- /**
154
- * @hidden
155
- */
156
- get calendarHeaderIdLabel() {
157
- return this.views === 1 ? this.id + 'header-' : null;
158
- }
159
- /**
160
- * Specifies the minimum allowed date value
161
- *
162
- * @default 1970-01-01
163
- */
164
- set min(min) {
165
- this._min = min || new Date(MIN_DATE);
166
- }
167
- get min() {
168
- return this._min;
169
- }
170
- /**
171
- * Specifies the maximum allowed date value
172
- *
173
- * @default 2099-12-31
174
- */
175
- set max(max) {
176
- this._max = max || new Date(MAX_DATE);
177
- }
178
- get max() {
179
- return this._max;
180
- }
181
- /**
182
- * Determines whether the built-in `min` or `max` validators are enforced when validating a form.
183
- *
184
- * @default false
185
- */
186
- rangeValidation = false;
187
- /**
188
- * Determines whether the built-in validator for disabled
189
- * date ranges is enforced when validating a form
190
- * ([see example](slug:disabled_dates_multiviewcalendar)).
191
- *
192
- * @default false
193
- */
194
- disabledDatesRangeValidation = false;
195
- /**
196
- * Sets the Calendar selection mode
197
- * ([see example]({% slug selection_multiviewcalendar %})).
198
- * @default 'single'
199
- */
200
- set selection(_selection) {
201
- this.selectionSetter = true;
202
- this._selection = _selection;
203
- }
204
- get selection() {
205
- return this._selection;
206
- }
207
- _selection = 'single';
208
- /**
209
- * Allows reverse selection when using `range` selection.
210
- * If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
211
- *
212
- * @default false
213
- */
214
- allowReverse = false;
215
- /**
216
- * Sets or gets the `value` property of the Calendar and defines the selected value of the component.
217
- *
218
- * > The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date)
219
- instance when in `single` selection mode, an array of valid JavaScript Date instances when in `multiple` selection mode, or
220
- an object of type `SelectionRange` when in `range` selection mode.
221
- */
222
- set value(candidate) {
223
- this.valueSetter = true;
224
- this._value = candidate;
225
- }
226
- get value() {
227
- return this._value;
228
- }
229
- /**
230
- * Specifies whether the component is disabled
231
- * ([see example]({% slug disabled_multiviewcalendar %})).
232
- * To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_multiviewcalendar#toc-managing-the-multiviewcalendar-disabled-state-in-reactive-forms).
233
- *
234
- * @default false
235
- */
236
- disabled = false;
237
- /**
238
- * Specifies the `tabindex` property of the Calendar. Based on the
239
- * [HTML `tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) behavior,
240
- * it determines whether the component is focusable.
241
- *
242
- * @default 0
243
- */
244
- tabindex = 0;
245
- /**
246
- * @hidden
247
- */
248
- set tabIndex(tabIndex) {
249
- this.tabindex = tabIndex;
250
- }
251
- get tabIndex() {
252
- return this.tabindex;
253
- }
254
- /**
255
- * Specifies the format of the displayed week day names.
256
- *
257
- * @default 'short'
258
- */
259
- weekDaysFormat = "short";
260
- /**
261
- * @hidden
262
- */
263
- isActive = false;
264
- /**
265
- * Specifies the dates of the MultiViewCalendar that will be disabled
266
- * ([see example]({% slug disabled_dates_multiviewcalendar %})).
267
- */
268
- set disabledDates(value) {
269
- this.disabledDatesService.initialize(value);
270
- }
271
- /**
272
- * Specifies the active view that the Calendar initially renders.
273
- * By default, the active view is `month`.
274
- *
275
- * > You have to set `activeView` within the `topView`-`bottomView` range.
276
- *
277
- * @default month
278
- */
279
- activeView = CalendarViewEnum[CalendarViewEnum.month];
280
- /**
281
- * Specifies the bottommost view to which you can navigate.
282
- *
283
- * @default month
284
- */
285
- bottomView = CalendarViewEnum[CalendarViewEnum.month];
286
- /**
287
- * Specifies the topmost view to which you can navigate.
288
- *
289
- * @default century
290
- */
291
- topView = CalendarViewEnum[CalendarViewEnum.century];
292
- /**
293
- * Determines whether to display a header for every view (for example, the month name).
294
- *
295
- * @default false
296
- */
297
- showViewHeader = false;
298
- /**
299
- * Determines whether to enable animation when navigating to previous/next view.
300
- *
301
- * > This feature uses the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API). In order to run the animation in browsers that do not support it, you need the `web-animations-js` polyfill.
302
- *
303
- * @default false
304
- */
305
- animateNavigation = false;
306
- /**
307
- * Specifies whether to display a week number column in the `month` view
308
- * ([see example]({% slug weeknumcolumn_multiviewcalendar %})).
309
- *
310
- * @default false
311
- */
312
- weekNumber = false;
313
- /**
314
- * Specifies which end of the defined selection range should be marked as active.
315
- *
316
- * > Value will be ignored if the selection range is undefined.
317
- * > If range selection is used then the default value is 'start'.
318
- */
319
- set activeRangeEnd(_activeRangeEnd) {
320
- this._activeRangeEnd = _activeRangeEnd;
321
- }
322
- get activeRangeEnd() {
323
- return (this.selection === 'range' && !this._activeRangeEnd) ? 'start' : this._activeRangeEnd;
324
- }
325
- /**
326
- * Specifies the `selectionRange` property and
327
- * defines the selection range of the component
328
- * ([see example](slug:selection_multiviewcalendar#toc-range-selection)).
329
- * > We recommend using the `value` property as it now supports `range` selection.
330
- */
331
- set selectionRange(range) {
332
- this._selectionRange = range;
333
- if (this.disabledDatesRangeValidation) {
334
- this.onValidatorChange();
335
- }
336
- }
337
- get selectionRange() {
338
- return this._selectionRange;
339
- }
340
- /**
341
- * Specifies the `views` property and
342
- * defines the number of rendered months.
343
- *
344
- * @default 2
345
- */
346
- views = 2;
347
- /**
348
- * Specifies the orientation of the MultiViewCalendar.
349
- *
350
- * The available values are:
351
- * * `horizontal` (default)
352
- * * `vertical`
353
- */
354
- orientation = 'horizontal';
355
- /**
356
- * Fires when the active view is changed
357
- * ([see example](slug:events_multiviewcalendar)).
358
- */
359
- activeViewChange = new EventEmitter();
360
- /**
361
- * Fires when navigating in the currently active view
362
- * ([see example](slug:events_multiviewcalendar)).
363
- */
364
- navigate = new EventEmitter();
365
- /**
366
- * Fires when a view cell is entered
367
- * ([see example](slug:events_multiviewcalendar)).
368
- */
369
- cellEnter = new EventEmitter();
370
- /**
371
- * Fires when a view cell is leaved
372
- * ([see example](slug:events_multiviewcalendar)).
373
- */
374
- cellLeave = new EventEmitter();
375
- /**
376
- * Fires when the value is changed
377
- * ([see example](slug:events_multiviewcalendar)).
378
- */
379
- valueChange = new EventEmitter();
380
- /**
381
- * @hidden
382
- * Fires when the range selection changes.
383
- */
384
- rangeSelectionChange = new EventEmitter();
385
- /**
386
- * Fires each time the MultiViewCalendar gets blurred
387
- * ([see example](slug:events_multiviewcalendar)).
388
- */
389
- blurEvent = new EventEmitter();
390
- /**
391
- * Fires each time the MultiViewCalendar gets focused
392
- * ([see example](slug:events_multiviewcalendar)).
393
- */
394
- focusEvent = new EventEmitter();
395
- /**
396
- * @hidden
397
- */
398
- focusCalendar = new EventEmitter();
399
- /**
400
- * @hidden
401
- */
402
- onClosePopup = new EventEmitter();
403
- /**
404
- * @hidden
405
- */
406
- onTabPress = new EventEmitter();
407
- /**
408
- * @hidden
409
- */
410
- onShiftTabPress = new EventEmitter();
411
- /**
412
- * @hidden
413
- *
414
- * Queries the template for a cell template declaration.
415
- * Ignored if a `[cellTemplate]` value is explicitly provided.
416
- */
417
- cellTemplate;
418
- /**
419
- * @hidden
420
- *
421
- * Defines the template for each cell.
422
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
423
- */
424
- set cellTemplateRef(template) {
425
- this._cellTemplateRef = template;
426
- }
427
- get cellTemplateRef() {
428
- return this._cellTemplateRef || this.cellTemplate;
429
- }
430
- /**
431
- * @hidden
432
- *
433
- * Queries the template for a month cell template declaration.
434
- * Ignored if a `[monthCellTemplate]` value is explicitly provided.
435
- */
436
- monthCellTemplate;
437
- /**
438
- * @hidden
439
- *
440
- * Defines the template for each month cell.
441
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
442
- */
443
- set monthCellTemplateRef(template) {
444
- this._monthCellTemplateRef = template;
445
- }
446
- get monthCellTemplateRef() {
447
- return this._monthCellTemplateRef || this.monthCellTemplate;
448
- }
449
- /**
450
- * @hidden
451
- *
452
- * Queries the template for a year cell template declaration.
453
- * Ignored if a `[yearCellTemplate]` value is explicitly provided.
454
- */
455
- yearCellTemplate;
456
- /**
457
- * @hidden
458
- *
459
- * Defines the template for each year cell.
460
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
461
- */
462
- set yearCellTemplateRef(template) {
463
- this._yearCellTemplateRef = template;
464
- }
465
- get yearCellTemplateRef() {
466
- return this._yearCellTemplateRef || this.yearCellTemplate;
467
- }
468
- /**
469
- * @hidden
470
- *
471
- * Queries the template for a decade cell template declaration.
472
- * Ignored if a `[decadeCellTemplate]` value is explicitly provided.
473
- */
474
- decadeCellTemplate;
475
- /**
476
- * @hidden
477
- *
478
- * Defines the template for each decade cell.
479
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
480
- */
481
- set decadeCellTemplateRef(template) {
482
- this._decadeCellTemplateRef = template;
483
- }
484
- get decadeCellTemplateRef() {
485
- return this._decadeCellTemplateRef || this.decadeCellTemplate;
486
- }
487
- /**
488
- * @hidden
489
- *
490
- * Queries the template for a century cell template declaration.
491
- * Ignored if a `[centuryCellTemplate]` value is explicitly provided.
492
- */
493
- centuryCellTemplate;
494
- /**
495
- * @hidden
496
- *
497
- * Defines the template for each century cell.
498
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
499
- */
500
- set centuryCellTemplateRef(template) {
501
- this._centuryCellTemplateRef = template;
502
- }
503
- get centuryCellTemplateRef() {
504
- return this._centuryCellTemplateRef || this.centuryCellTemplate;
505
- }
506
- /**
507
- * @hidden
508
- *
509
- * Queries the template for a week number cell template declaration.
510
- * Ignored if a `[weekNumberTemplate]` value is explicitly provided.
511
- */
512
- weekNumberTemplate;
513
- /**
514
- * @hidden
515
- *
516
- * Defines the template for the week cell.
517
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
518
- */
519
- set weekNumberTemplateRef(template) {
520
- this._weekNumberTemplateRef = template;
521
- }
522
- get weekNumberTemplateRef() {
523
- return this._weekNumberTemplateRef || this.weekNumberTemplate;
524
- }
525
- /**
526
- * @hidden
527
- *
528
- * Queries the template for a header title template declaration.
529
- * Ignored if a `[headerTitleTemplate]` value is explicitly provided.
530
- */
531
- headerTitleTemplate;
532
- /**
533
- * @hidden
534
- *
535
- * Queries the template for a header template declaration.
536
- */
537
- headerTemplate;
538
- /**
539
- * @hidden
540
- *
541
- * Queries the template for a header template declaration.
542
- */
543
- footerTemplate;
544
- /**
545
- * @hidden
546
- *
547
- * Defines the template for the Calendar footer.
548
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
549
- */
550
- set footerTemplateRef(template) {
551
- this._footerTemplateRef = template;
552
- }
553
- get footerTemplateRef() {
554
- return this._footerTemplateRef || this.footerTemplate;
555
- }
556
- /**
557
- * @hidden
558
- *
559
- * Defines the template for the header title.
560
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
561
- */
562
- set headerTitleTemplateRef(template) {
563
- this._headerTitleTemplateRef = template;
564
- }
565
- get headerTitleTemplateRef() {
566
- return this._headerTitleTemplateRef || this.headerTitleTemplate;
567
- }
568
- /**
569
- * @hidden
570
- *
571
- * Defines the template for the Calendar header.
572
- * Takes precedence over nested templates in the KendoMultiViewCalendar tag.
573
- */
574
- set headerTemplateRef(template) {
575
- this._headerTemplateRef = template;
576
- }
577
- get headerTemplateRef() {
578
- return this._headerTemplateRef || this.headerTemplate;
579
- }
580
- headerElement;
581
- viewList;
582
- cellUID = guid();
583
- isHovered = false;
584
- activeDate;
585
- isPrevDisabled = true;
586
- isNextDisabled = true;
587
- prevView = Action.PrevView;
588
- nextView = Action.NextView;
589
- selectedDates = [];
590
- rangePivot;
591
- shouldHoverWhenNoStart = false;
592
- canHover = false;
593
- changes = {};
594
- valueSetter = false;
595
- selectionSetter = false;
596
- _min = new Date(MIN_DATE);
597
- _max = new Date(MAX_DATE);
598
- _focusedDate = getToday();
599
- _value;
600
- _selectionRange = { start: null, end: null };
601
- _activeRangeEnd;
602
- resolvedPromise = Promise.resolve();
603
- onControlChange = noop;
604
- onControlTouched = noop;
605
- onValidatorChange = noop;
606
- minValidateFn = noop;
607
- maxValidateFn = noop;
608
- disabledDatesRangeValidateFn = noop;
609
- subscriptions = new Subscription();
610
- _cellTemplateRef;
611
- _monthCellTemplateRef;
612
- _yearCellTemplateRef;
613
- _decadeCellTemplateRef;
614
- _centuryCellTemplateRef;
615
- _weekNumberTemplateRef;
616
- _headerTitleTemplateRef;
617
- _headerTemplateRef;
618
- _footerTemplateRef;
619
- get activeViewEnum() {
620
- const activeView = CalendarViewEnum[this.activeView];
621
- return activeView < this.bottomViewEnum ? this.bottomViewEnum : activeView;
622
- }
623
- get bottomViewEnum() {
624
- return CalendarViewEnum[this.bottomView];
625
- }
626
- get topViewEnum() {
627
- return CalendarViewEnum[this.topView];
628
- }
629
- get widgetId() {
630
- return this.views >= 2 ? this.id : null;
631
- }
632
- get ariaDisabled() {
633
- return this.disabled;
634
- }
635
- /**
636
- * @hidden
637
- */
638
- get ariaActivedescendant() {
639
- return this.cellUID + this.focusedDate.getTime();
640
- }
641
- /**
642
- * @hidden
643
- */
644
- handleFocusout(event) {
645
- const relatedTarget = event.relatedTarget;
646
- if (!this.element.nativeElement.contains(relatedTarget)) {
647
- const isClassicCalendar = this.views === 1;
648
- isClassicCalendar ? this.blurEvent.emit(event) : this.blurEvent.emit();
649
- this.onControlTouched();
650
- }
651
- this.isActive = false;
652
- this.isHovered = false; //ensure that hovered is also not active
653
- }
654
- /**
655
- * @hidden
656
- */
657
- handleFocus() {
658
- this.isActive = true;
659
- const isClassicCalendar = this.views === 1;
660
- isClassicCalendar ? this.focusCalendar.emit() : this.focusEvent.emit();
661
- this.focusEvent.emit();
662
- }
663
- /**
664
- * @hidden
665
- */
666
- handleMouseEnter() {
667
- this.isHovered = true;
668
- }
669
- /**
670
- * @hidden
671
- */
672
- handleMouseLeave() {
673
- this.isHovered = false;
674
- this.setRangeSelectionToValue();
675
- }
676
- /**
677
- * @hidden
678
- */
679
- handleMousedown(event) {
680
- event.preventDefault();
681
- }
682
- /**
683
- * @hidden
684
- */
685
- handleClick() {
686
- if (this.isActive) {
687
- return;
688
- }
689
- this.focus();
690
- }
691
- /**
692
- * @hidden
693
- */
694
- keydown(event) {
695
- const code = normalizeKeys(event);
696
- const arrowUpOrDownKeyPressed = [Keys.ArrowUp, Keys.ArrowDown].indexOf(code) !== -1;
697
- const ctrlKey = event.ctrlKey || event.metaKey;
698
- const onArrowRightAndControl = code === Keys.ArrowRight && ctrlKey;
699
- const onArrowLeftAndControl = code === Keys.ArrowLeft && ctrlKey;
700
- const onTKeyPress = code === Keys.KeyT;
701
- const onEnterKeyPress = code === Keys.Enter;
702
- const onArrowUpPress = code === Keys.ArrowUp;
703
- const altKey = event.altKey;
704
- const escKey = code === Keys.Escape;
705
- const tabKeyPress = code === Keys.Tab;
706
- const shiftKeyPress = event.shiftKey;
707
- if (onArrowRightAndControl) {
708
- event.preventDefault();
709
- this.navigateView(this.nextView);
710
- return;
711
- }
712
- else if (onArrowLeftAndControl) {
713
- event.preventDefault();
714
- this.navigateView(this.prevView);
715
- return;
716
- }
717
- else if (ctrlKey && arrowUpOrDownKeyPressed) {
718
- event.preventDefault();
719
- }
720
- else if (onTKeyPress) {
721
- this.focusedDate = getToday();
722
- this.bus.moveToBottom(this.activeViewEnum);
723
- this.updateButtonState();
724
- return;
725
- }
726
- else if (onEnterKeyPress) {
727
- if (this.selection !== 'range') {
728
- this.selectionService.lastClicked = this.focusedDate;
729
- this.performSelection(this.focusedDate, event);
730
- }
731
- else {
732
- this.performRangeSelection(this.focusedDate);
733
- }
734
- }
735
- if (this.views >= 2) {
736
- if ((escKey || (altKey && onArrowUpPress))) {
737
- this.onClosePopup.emit(event);
738
- }
739
- else if ((tabKeyPress && shiftKeyPress)) {
740
- this.onShiftTabPress.emit(event);
741
- }
742
- else if ((tabKeyPress && !shiftKeyPress)) {
743
- this.onTabPress.emit(event);
744
- }
745
- }
746
- const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
747
- if (isEqual(this.focusedDate, candidate)) {
748
- return;
749
- }
750
- this.focusedDate = candidate;
751
- event.preventDefault();
752
- const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
753
- if (!isSameView) {
754
- this.emitNavigate(this.focusedDate);
755
- this.updateButtonState();
756
- }
757
- if (isArrowWithShiftPressed(event) && this.selection !== 'range') {
758
- event['anyArrow'] = true;
759
- this.performSelection(this.focusedDate, event);
760
- }
761
- }
762
- constructor(bus, element, navigator, renderer, cdr, zone, disabledDatesService, selectionService) {
763
- this.bus = bus;
764
- this.element = element;
765
- this.navigator = navigator;
766
- this.renderer = renderer;
767
- this.cdr = cdr;
768
- this.zone = zone;
769
- this.disabledDatesService = disabledDatesService;
770
- this.selectionService = selectionService;
771
- this.id = `kendo-multiviewcalendarid-${this.bus.calendarId}-`;
772
- }
773
- ngOnInit() {
774
- this.setClasses(this.element.nativeElement);
775
- this.subscriptions.add(this.bus.viewChanged.subscribe(({ view }) => {
776
- this.activeView = CalendarViewEnum[view];
777
- this.activeViewChange.emit(this.activeView);
778
- this.cdr.detectChanges();
779
- this.updateButtonState();
780
- }));
781
- }
782
- ngOnChanges(changes) {
783
- this.changes = changes;
784
- this.verifyChanges();
785
- this.bus.configure(this.bottomViewEnum, this.topViewEnum);
786
- }
787
- ngDoCheck() {
788
- if (this.valueSetter || this.selectionSetter) {
789
- if (this.selection === 'range' &&
790
- (this.value?.start || this.value?.end) &&
791
- this.focusedDate.getTime() !== this.value.start?.getTime() &&
792
- this.focusedDate.getTime() !== this.value.end?.getTime()) {
793
- this.focusedDate = this.value.start || this.value.end || getToday();
794
- }
795
- this.setValue(this.value);
796
- this.valueSetter = false;
797
- this.selectionSetter = false;
798
- }
799
- if (hasExistingValue(this.changes, 'focusedDate')) {
800
- const focusedDate = this.changes.focusedDate.currentValue;
801
- this.focusedDate = dateInRange(focusedDate, this.min, this.max);
802
- }
803
- if (this.changes.min || this.changes.max || this.changes.rangeValidation || this.changes.disabledDates || this.changes.disabledDatesRangeValidation) {
804
- this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop;
805
- this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop;
806
- this.disabledDatesRangeValidateFn = this.disabledDatesRangeValidation ? disabledDatesRangeValidator(this.disabledDatesService.isDateDisabled) : noop;
807
- this.onValidatorChange();
808
- }
809
- if (this.changes.min || this.changes.max || this.changes.focusedDate || this.changes.activeView || this.changes.value) {
810
- this.updateButtonState();
811
- }
812
- this.changes = {};
813
- }
814
- ngOnDestroy() {
815
- this.subscriptions.unsubscribe();
816
- }
817
- ngAfterViewInit() {
818
- this.updateButtonState();
819
- }
820
- /**
821
- * Focuses the host element of the Calendar.
822
- *
823
- * @example
824
- * ```ts
825
- * _@Component({
826
- * selector: 'my-app',
827
- * template: `
828
- * <button (click)="multiviewcalendar.focus()">Focus calendar</button>
829
- * <kendo-multiviewcalendar #multiviewcalendar></kendo-multiviewcalendar>
830
- * `
831
- * })
832
- * export class AppComponent { }
833
- * ```
834
- */
835
- focus() {
836
- if (!this.element) {
837
- return;
838
- }
839
- // Prevent the content from auto-scrolling when daterange is in adaptive mode
840
- this.element.nativeElement.querySelector('.k-calendar-view').focus({ preventScroll: true });
841
- }
842
- /**
843
- * Blurs the Calendar component.
844
- */
845
- blur() {
846
- if (!this.element) {
847
- return;
848
- }
849
- const activeElement = this.views >= 2 ? this.element.nativeElement.querySelector('.k-calendar-view') :
850
- this.element.nativeElement.querySelector('.k-calendar-table');
851
- activeElement.blur();
852
- }
853
- /**
854
- * @hidden
855
- */
856
- handleDateChange(args) {
857
- const canNavigateDown = this.bus.canMoveDown(this.activeViewEnum);
858
- const availableDates = args.selectedDates.filter(date => !this.disabledDatesService.isDateDisabled(date));
859
- this.focusedDate = args.focusedDate || this.focusedDate;
860
- const sameDates = !canNavigateDown && areDatesEqual(availableDates, this.selectedDates);
861
- if (sameDates && !canNavigateDown && this.selection === 'single') {
862
- this.onClosePopup.emit();
863
- }
864
- if (this.disabled || sameDates) {
865
- return;
866
- }
867
- if (canNavigateDown) {
868
- this.bus.moveDown(this.activeViewEnum);
869
- return;
870
- }
871
- if (this.disabledDatesService.isDateDisabled(this.focusedDate)) {
872
- return;
873
- }
874
- if (this.selection === 'range') {
875
- return;
876
- }
877
- this.selectedDates = availableDates.map(date => cloneDate(date));
878
- this.value = this.parseSelectionToValue(availableDates);
879
- this.onControlChange(this.parseSelectionToValue(availableDates));
880
- this.valueChange.emit(this.parseSelectionToValue(availableDates));
881
- }
882
- /**
883
- * @hidden
884
- */
885
- onCellEnter(cellEnter, date) {
886
- this.emitCellEvent(cellEnter, date);
887
- if (this.selection === 'range' && (this.canHover || this.shouldHoverWhenNoStart)) {
888
- this.zone.run(() => {
889
- if (this.canHover && !this.shouldHoverWhenNoStart) {
890
- if (this.allowReverse) {
891
- if (this.activeRangeEnd === 'end' && this.selectionRange.start) {
892
- this.selectionRange = { start: this.selectionRange.start, end: date };
893
- }
894
- if (this.activeRangeEnd === 'start' && this.selectionRange.end) {
895
- this.selectionRange = { start: date, end: this.selectionRange.end };
896
- }
897
- }
898
- else {
899
- if (this.activeRangeEnd === 'end' && this.selectionRange.start && date >= this.selectionRange.start) {
900
- this.selectionRange = { start: this.selectionRange.start, end: date };
901
- }
902
- if (this.selectionRange.start && date < this.selectionRange.start) {
903
- this.selectionRange = { start: this.selectionRange.start, end: null };
904
- }
905
- }
906
- }
907
- else if (this.shouldHoverWhenNoStart && date <= this.selectionRange.end) {
908
- this.selectionRange = { start: date, end: this.selectionRange.end };
909
- }
910
- else {
911
- this.selectionRange = { start: null, end: this.selectionRange.end };
912
- }
913
- });
914
- }
915
- }
916
- /**
917
- * @hidden
918
- */
919
- handleTodayButtonClick(args) {
920
- const todayDate = args.focusedDate;
921
- const isSameView = this.bus.service(this.activeViewEnum).isInArray(todayDate, this.viewList.dates);
922
- const isBottomView = !this.bus.canMoveDown(this.activeViewEnum);
923
- if (!isSameView && isBottomView) {
924
- this.emitNavigate(todayDate);
925
- this.updateButtonState();
926
- }
927
- if (this.selection === 'range' && isBottomView) {
928
- this.performRangeSelection(todayDate);
929
- }
930
- else {
931
- this.handleDateChange(args);
932
- }
933
- }
934
- /**
935
- * @hidden
936
- */
937
- setActiveDate(date) {
938
- this.activeDate = cloneDate(date);
939
- this.cdr.detectChanges();
940
- }
941
- /**
942
- * @hidden
943
- */
944
- writeValue(candidate) {
945
- this.verifyValue(candidate);
946
- this.value = candidate;
947
- this.cdr.markForCheck();
948
- }
949
- /**
950
- * @hidden
951
- */
952
- registerOnChange(fn) {
953
- this.onControlChange = fn;
954
- }
955
- /**
956
- * @hidden
957
- */
958
- registerOnTouched(fn) {
959
- this.onControlTouched = fn;
960
- }
961
- /**
962
- * @hidden
963
- */
964
- setDisabledState(isDisabled) {
965
- this.disabled = isDisabled;
966
- this.cdr.markForCheck();
967
- }
968
- /**
969
- * @hidden
970
- */
971
- validate(control) {
972
- return this.minValidateFn(control) || this.maxValidateFn(control) || this.disabledDatesRangeValidateFn(this.selectionRange);
973
- }
974
- /**
975
- * @hidden
976
- */
977
- registerOnValidatorChange(fn) {
978
- this.onValidatorChange = fn;
979
- }
980
- /**
981
- * @hidden
982
- */
983
- activeCellTemplate() {
984
- switch (this.activeViewEnum) {
985
- case CalendarViewEnum.month:
986
- return this.monthCellTemplateRef || this.cellTemplateRef;
987
- case CalendarViewEnum.year:
988
- return this.yearCellTemplateRef;
989
- case CalendarViewEnum.decade:
990
- return this.decadeCellTemplateRef;
991
- case CalendarViewEnum.century:
992
- return this.centuryCellTemplateRef;
993
- default:
994
- return null;
995
- }
996
- }
997
- /**
998
- * @hidden
999
- */
1000
- navigateView(action) {
1001
- this.focusedDate = this.viewList.navigate(action);
1002
- this.updateButtonState();
1003
- this.emitNavigate(this.focusedDate);
1004
- }
1005
- /**
1006
- * @hidden
1007
- */
1008
- emitNavigate(focusedDate) {
1009
- const activeView = CalendarViewEnum[this.activeViewEnum];
1010
- this.navigate.emit({ activeView, focusedDate });
1011
- }
1012
- /**
1013
- * @hidden
1014
- */
1015
- emitCellEvent(emitter, args) {
1016
- if (hasObservers(emitter)) {
1017
- this.zone.run(() => {
1018
- emitter.emit(args);
1019
- });
1020
- }
1021
- }
1022
- /**
1023
- * @hidden
1024
- */
1025
- handleCellClick({ date, modifiers }) {
1026
- if (this.selection === 'range' && this.activeViewEnum === CalendarViewEnum[this.bottomView]) {
1027
- this.performRangeSelection(date);
1028
- }
1029
- else {
1030
- this.selectionService.lastClicked = date;
1031
- this.performSelection(date, modifiers);
1032
- }
1033
- const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
1034
- if (!isSameView) {
1035
- this.emitNavigate(this.focusedDate);
1036
- this.updateButtonState();
1037
- }
1038
- }
1039
- /**
1040
- * @hidden
1041
- */
1042
- handleWeekNumberClick(dates) {
1043
- if (this.selection === 'single') {
1044
- return;
1045
- }
1046
- this.zone.run(() => {
1047
- if (this.selection === 'multiple') {
1048
- this.handleDateChange({
1049
- selectedDates: dates,
1050
- focusedDate: last(dates),
1051
- });
1052
- }
1053
- if (this.selection === 'range') {
1054
- this.activeRangeEnd = 'start';
1055
- const shouldEmitValueChange = this.selectionRange.start?.getTime() !== dates[0].getTime() ||
1056
- this.selectionRange.end?.getTime() !== last(dates).getTime();
1057
- this.selectionRange.start = dates[0];
1058
- this.selectionRange.end = last(dates);
1059
- this.value = this.selectionRange;
1060
- if (shouldEmitValueChange) {
1061
- this.valueChange.emit(this.value);
1062
- }
1063
- }
1064
- });
1065
- }
1066
- setClasses(element) {
1067
- this.renderer.addClass(element, 'k-calendar');
1068
- this.renderer.addClass(element, getSizeClass('calendar', this.size));
1069
- if (this.views >= 2) {
1070
- this.renderer.addClass(element, 'k-calendar-range');
1071
- }
1072
- }
1073
- verifyChanges() {
1074
- if (!isDevMode()) {
1075
- return;
1076
- }
1077
- if (this.min > this.max) {
1078
- throw new Error(`The max value should be bigger than the min. See ${MIN_DOC_LINK} and ${MAX_DOC_LINK}.`);
1079
- }
1080
- if (this.bottomViewEnum > this.topViewEnum) {
1081
- throw new Error(`The topView should be greater than bottomView. See ${BOTTOM_VIEW_DOC_LINK} and ${TOP_VIEW_DOC_LINK}.`);
1082
- }
1083
- }
1084
- verifyValue(candidate) {
1085
- if (!isDevMode()) {
1086
- return;
1087
- }
1088
- if (this.selection === 'single' && candidate && !(isNullOrDate(candidate))) {
1089
- throw new Error(`When using 'single' selection the 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK} for possible resolution.`);
1090
- }
1091
- else if (this.selection === 'multiple' && candidate) {
1092
- if (Array.isArray(candidate)) {
1093
- const onlyDates = candidate.every(value => value instanceof Date);
1094
- if (!onlyDates) {
1095
- throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK} for possible resolution.`);
1096
- }
1097
- }
1098
- if (Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
1099
- throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK} for possible resolution.`);
1100
- }
1101
- }
1102
- else if (this.selection === 'range' && candidate && !(isNullOrDate(candidate['start']) && isNullOrDate(candidate['end']))) {
1103
- throw new Error(`The 'value' should be an object with start and end dates. Check ${VALUE_DOC_LINK} for possible resolution.`);
1104
- }
1105
- }
1106
- updateButtonState() {
1107
- this.resolvedPromise.then(() => {
1108
- this.cdr.detectChanges();
1109
- this.isPrevDisabled = !this.viewList.canNavigate(this.prevView);
1110
- this.isNextDisabled = !this.viewList.canNavigate(this.nextView);
1111
- this.cdr.markForCheck();
1112
- });
1113
- }
1114
- parseSelectionToValue(selection) {
1115
- selection = selection || [];
1116
- return this.selection === 'single' ? cloneDate(last(selection)) : selection.map(date => cloneDate(date));
1117
- }
1118
- setValue(candidate) {
1119
- this.verifyValue(candidate);
1120
- if (candidate === null) {
1121
- this._value = null;
1122
- this.selectedDates = [];
1123
- }
1124
- else if (Array.isArray(candidate)) {
1125
- this.selectionRange = { start: null, end: null };
1126
- this._value = candidate.filter(date => isPresent(date)).map(element => cloneDate(element));
1127
- }
1128
- else if (isObject(candidate) && Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
1129
- this.selectedDates = [];
1130
- this.selectionRange = { start: null, end: null };
1131
- this._value = { start: null, end: null };
1132
- this._value.start = candidate.start instanceof Date ? cloneDate(candidate.start) : null;
1133
- this._value.end = candidate.end instanceof Date ? cloneDate(candidate.end) : null;
1134
- this.selectionRange = Object.assign({}, this._value);
1135
- if (this._value?.start && !this._value?.end) {
1136
- this.activeRangeEnd = 'end';
1137
- this.canHover = true;
1138
- }
1139
- if (this._value?.end && !this._value?.start) {
1140
- this.activeRangeEnd = 'start';
1141
- this.canHover = true;
1142
- }
1143
- if (this._value?.end && this._value?.start) {
1144
- this.canHover = false;
1145
- }
1146
- }
1147
- else {
1148
- this.selectionRange = { start: null, end: null };
1149
- this._value = cloneDate(candidate);
1150
- }
1151
- if (this.selection !== 'range') {
1152
- const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
1153
- if (!areDatesEqual(selection, this.selectedDates)) {
1154
- const lastSelected = last(selection);
1155
- this.rangePivot = cloneDate(lastSelected);
1156
- this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
1157
- this.selectedDates = selection;
1158
- }
1159
- }
1160
- }
1161
- setRangeSelectionToValue() {
1162
- if (this.selection === 'range' && this.value) {
1163
- this.selectionRange = this.value;
1164
- this.cdr.markForCheck();
1165
- }
1166
- }
1167
- performRangeSelection(date) {
1168
- this.focusedDate = date;
1169
- const clonedRangeSelection = Object.assign({}, this.selectionRange);
1170
- const emitValueChange = (this.activeRangeEnd === 'start' && this.value?.start?.getTime() !== date?.getTime()) ||
1171
- (this.activeRangeEnd === 'end' && this.value?.end?.getTime() !== date?.getTime());
1172
- this.zone.run(() => {
1173
- const rangeSelection = handleRangeSelection(date, clonedRangeSelection, this.activeRangeEnd, this.allowReverse);
1174
- this.activeRangeEnd = rangeSelection.activeRangeEnd;
1175
- if (this.canHover && rangeSelection.activeRangeEnd === 'end' && rangeSelection.selectionRange.end?.getTime() === date.getTime()) {
1176
- this.activeRangeEnd = 'start';
1177
- rangeSelection.activeRangeEnd = 'start';
1178
- }
1179
- this.canHover = this.activeRangeEnd === 'end' && rangeSelection.selectionRange.start && !rangeSelection.selectionRange.end;
1180
- if (emitValueChange && (this.value?.start?.getTime() !== rangeSelection.selectionRange?.start?.getTime() ||
1181
- this.value?.end?.getTime() !== rangeSelection.selectionRange?.end?.getTime())) {
1182
- this.value = rangeSelection.selectionRange;
1183
- this.valueChange.emit(this.value);
1184
- this.rangeSelectionChange.emit(rangeSelection);
1185
- }
1186
- this.cdr.markForCheck();
1187
- });
1188
- }
1189
- performSelection(date, selectionModifiers) {
1190
- const selection = this.selectionService.performSelection({
1191
- date: date,
1192
- modifiers: selectionModifiers,
1193
- selectionMode: this.selection,
1194
- activeViewEnum: this.activeViewEnum,
1195
- rangePivot: this.rangePivot,
1196
- selectedDates: this.selectedDates
1197
- });
1198
- this.rangePivot = selection.rangePivot;
1199
- this.handleDateChange({
1200
- selectedDates: selection.selectedDates,
1201
- focusedDate: date
1202
- });
1203
- }
1204
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MultiViewCalendarComponent, deps: [{ token: i1.BusViewService }, { token: i0.ElementRef }, { token: i2.NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i3.DisabledDatesService }, { token: i4.SelectionService }], target: i0.ɵɵFactoryTarget.Component });
1205
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MultiViewCalendarComponent, isStandalone: true, selector: "kendo-multiviewcalendar", inputs: { showOtherMonthDays: "showOtherMonthDays", showCalendarHeader: "showCalendarHeader", size: "size", 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: [
1206
- BusViewService,
1207
- RANGE_CALENDAR_VALUE_ACCESSOR,
1208
- RANGE_CALENDAR_RANGE_VALIDATORS,
1209
- LocalizationService,
1210
- DisabledDatesService,
1211
- {
1212
- provide: L10N_PREFIX,
1213
- useValue: 'kendo.multiviewcalendar'
1214
- },
1215
- NavigationService,
1216
- SelectionService
1217
- ], queries: [{ propertyName: "cellTemplate", first: true, predicate: CellTemplateDirective, descendants: true }, { propertyName: "monthCellTemplate", first: true, predicate: MonthCellTemplateDirective, descendants: true }, { propertyName: "yearCellTemplate", first: true, predicate: YearCellTemplateDirective, descendants: true }, { propertyName: "decadeCellTemplate", first: true, predicate: DecadeCellTemplateDirective, descendants: true }, { propertyName: "centuryCellTemplate", first: true, predicate: CenturyCellTemplateDirective, descendants: true }, { propertyName: "weekNumberTemplate", first: true, predicate: WeekNumberCellTemplateDirective, descendants: true }, { propertyName: "headerTitleTemplate", first: true, predicate: HeaderTitleTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "headerElement", first: true, predicate: HeaderComponent, descendants: true, read: ElementRef }, { propertyName: "viewList", first: true, predicate: HorizontalViewListComponent, descendants: true }], exportAs: ["kendo-multiviewcalendar"], usesOnChanges: true, ngImport: i0, template: `
1218
- <ng-container kendoMultiViewCalendarLocalizedMessages
1219
- i18n-today="kendo.multiviewcalendar.today|The label for the today button in the calendar header"
1220
- today="Today"
1221
-
1222
- i18n-prevButtonTitle="kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar"
1223
- prevButtonTitle="Navigate to previous view"
1224
-
1225
- i18n-nextButtonTitle="kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar"
1226
- nextButtonTitle="Navigate to next view"
1227
-
1228
- i18n-parentViewButtonTitle="kendo.multiviewcalendar.parentViewButtonTitle|The title of the parent view button in the Multiview calendar header"
1229
- parentViewButtonTitle="Navigate to parent view"
1230
- >
1231
- </ng-container>
1232
- @if (showCalendarHeader) {
1233
- <kendo-calendar-header
1234
- [activeView]="activeViewEnum"
1235
- [currentDate]="activeDate"
1236
- [size]="size"
1237
- [min]="min"
1238
- [max]="max"
1239
- [id]="headerId"
1240
- [rangeLength]="views"
1241
- [titleTemplateRef]="headerTitleTemplateRef?.templateRef"
1242
- [headerTemplateRef]="headerTemplateRef?.templateRef"
1243
- [isPrevDisabled]="isPrevDisabled"
1244
- [isNextDisabled]="isNextDisabled"
1245
- [showNavigationButtons]="true"
1246
- [orientation]="orientation"
1247
- (todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
1248
- (prevButtonClick)="navigateView(prevView)"
1249
- (nextButtonClick)="navigateView(nextView)"
1250
- >
1251
- </kendo-calendar-header>
1252
- }
1253
- <kendo-calendar-horizontal
1254
- [showOtherMonthDays]="showOtherMonthDays"
1255
- [allowReverse]="allowReverse"
1256
- [id]="calendarHeaderIdLabel"
1257
- [attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
1258
- [activeView]="activeViewEnum"
1259
- [activeDescendant]="ariaActivedescendant"
1260
- [isActive]="isActive || isHovered"
1261
- [cellTemplateRef]="activeCellTemplate()?.templateRef"
1262
- [weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
1263
- [cellUID]="cellUID"
1264
- [weekDaysFormat]="weekDaysFormat"
1265
- [views]="views"
1266
- [min]="min"
1267
- [max]="max"
1268
- [focusedDate]="focusedDate"
1269
- [animateNavigation]="animateNavigation"
1270
- [showViewHeader]="showViewHeader"
1271
- [weekNumber]="weekNumber"
1272
- [activeRangeEnd]="activeRangeEnd"
1273
- [selectionRange]="selectionRange"
1274
- [selectedDates]="selectedDates"
1275
- [orientation]="orientation"
1276
- [tabIndex]="tabIndex"
1277
- [disabled]="disabled"
1278
- (cellClick)="handleCellClick($event)"
1279
- (weekNumberCellClick)="handleWeekNumberClick($event)"
1280
- (cellEnter)="onCellEnter(cellEnter, $event)"
1281
- (cellLeave)="emitCellEvent(cellLeave, $event)"
1282
- (activeDateChange)="setActiveDate($event)"
1283
- (focusCalendar)="handleFocus()"
1284
- (blurCalendar)="handleFocusout($event)"
1285
- >
1286
- </kendo-calendar-horizontal>
1287
- @if (footer) {
1288
- <kendo-calendar-footer
1289
- [footerTemplateRef]="footerTemplateRef?.templateRef"
1290
- [activeViewValue]="activeView"
1291
- [currentDate]="activeDate">
1292
- </kendo-calendar-footer>
1293
- }
1294
- `, isInline: true, dependencies: [{ kind: "directive", type: MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }, { kind: "component", type: HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "titleTemplateRef", "headerTemplateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id", "size"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { 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: "component", type: FooterComponent, selector: "kendo-calendar-footer", inputs: ["footerTemplateRef", "activeViewValue", "currentDate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1295
- }
1296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MultiViewCalendarComponent, decorators: [{
1297
- type: Component,
1298
- args: [{
1299
- changeDetection: ChangeDetectionStrategy.OnPush,
1300
- exportAs: 'kendo-multiviewcalendar',
1301
- providers: [
1302
- BusViewService,
1303
- RANGE_CALENDAR_VALUE_ACCESSOR,
1304
- RANGE_CALENDAR_RANGE_VALIDATORS,
1305
- LocalizationService,
1306
- DisabledDatesService,
1307
- {
1308
- provide: L10N_PREFIX,
1309
- useValue: 'kendo.multiviewcalendar'
1310
- },
1311
- NavigationService,
1312
- SelectionService
1313
- ],
1314
- selector: 'kendo-multiviewcalendar',
1315
- template: `
1316
- <ng-container kendoMultiViewCalendarLocalizedMessages
1317
- i18n-today="kendo.multiviewcalendar.today|The label for the today button in the calendar header"
1318
- today="Today"
1319
-
1320
- i18n-prevButtonTitle="kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar"
1321
- prevButtonTitle="Navigate to previous view"
1322
-
1323
- i18n-nextButtonTitle="kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar"
1324
- nextButtonTitle="Navigate to next view"
1325
-
1326
- i18n-parentViewButtonTitle="kendo.multiviewcalendar.parentViewButtonTitle|The title of the parent view button in the Multiview calendar header"
1327
- parentViewButtonTitle="Navigate to parent view"
1328
- >
1329
- </ng-container>
1330
- @if (showCalendarHeader) {
1331
- <kendo-calendar-header
1332
- [activeView]="activeViewEnum"
1333
- [currentDate]="activeDate"
1334
- [size]="size"
1335
- [min]="min"
1336
- [max]="max"
1337
- [id]="headerId"
1338
- [rangeLength]="views"
1339
- [titleTemplateRef]="headerTitleTemplateRef?.templateRef"
1340
- [headerTemplateRef]="headerTemplateRef?.templateRef"
1341
- [isPrevDisabled]="isPrevDisabled"
1342
- [isNextDisabled]="isNextDisabled"
1343
- [showNavigationButtons]="true"
1344
- [orientation]="orientation"
1345
- (todayButtonClick)="handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })"
1346
- (prevButtonClick)="navigateView(prevView)"
1347
- (nextButtonClick)="navigateView(nextView)"
1348
- >
1349
- </kendo-calendar-header>
1350
- }
1351
- <kendo-calendar-horizontal
1352
- [showOtherMonthDays]="showOtherMonthDays"
1353
- [allowReverse]="allowReverse"
1354
- [id]="calendarHeaderIdLabel"
1355
- [attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
1356
- [activeView]="activeViewEnum"
1357
- [activeDescendant]="ariaActivedescendant"
1358
- [isActive]="isActive || isHovered"
1359
- [cellTemplateRef]="activeCellTemplate()?.templateRef"
1360
- [weekNumberTemplateRef]="weekNumberTemplateRef?.templateRef"
1361
- [cellUID]="cellUID"
1362
- [weekDaysFormat]="weekDaysFormat"
1363
- [views]="views"
1364
- [min]="min"
1365
- [max]="max"
1366
- [focusedDate]="focusedDate"
1367
- [animateNavigation]="animateNavigation"
1368
- [showViewHeader]="showViewHeader"
1369
- [weekNumber]="weekNumber"
1370
- [activeRangeEnd]="activeRangeEnd"
1371
- [selectionRange]="selectionRange"
1372
- [selectedDates]="selectedDates"
1373
- [orientation]="orientation"
1374
- [tabIndex]="tabIndex"
1375
- [disabled]="disabled"
1376
- (cellClick)="handleCellClick($event)"
1377
- (weekNumberCellClick)="handleWeekNumberClick($event)"
1378
- (cellEnter)="onCellEnter(cellEnter, $event)"
1379
- (cellLeave)="emitCellEvent(cellLeave, $event)"
1380
- (activeDateChange)="setActiveDate($event)"
1381
- (focusCalendar)="handleFocus()"
1382
- (blurCalendar)="handleFocusout($event)"
1383
- >
1384
- </kendo-calendar-horizontal>
1385
- @if (footer) {
1386
- <kendo-calendar-footer
1387
- [footerTemplateRef]="footerTemplateRef?.templateRef"
1388
- [activeViewValue]="activeView"
1389
- [currentDate]="activeDate">
1390
- </kendo-calendar-footer>
1391
- }
1392
- `,
1393
- standalone: true,
1394
- imports: [MultiViewCalendarLocalizedMessagesDirective, HeaderComponent, HorizontalViewListComponent, FooterComponent]
1395
- }]
1396
- }], ctorParameters: () => [{ type: i1.BusViewService }, { type: i0.ElementRef }, { type: i2.NavigationService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i3.DisabledDatesService }, { type: i4.SelectionService }], propDecorators: { showOtherMonthDays: [{
1397
- type: Input
1398
- }], showCalendarHeader: [{
1399
- type: Input
1400
- }], size: [{
1401
- type: Input
1402
- }], id: [{
1403
- type: Input
1404
- }], focusedDate: [{
1405
- type: Input
1406
- }], footer: [{
1407
- type: Input
1408
- }], min: [{
1409
- type: Input
1410
- }], max: [{
1411
- type: Input
1412
- }], rangeValidation: [{
1413
- type: Input
1414
- }], disabledDatesRangeValidation: [{
1415
- type: Input
1416
- }], selection: [{
1417
- type: Input
1418
- }], allowReverse: [{
1419
- type: Input
1420
- }], value: [{
1421
- type: Input
1422
- }], disabled: [{
1423
- type: Input
1424
- }], tabindex: [{
1425
- type: Input
1426
- }], tabIndex: [{
1427
- type: Input
1428
- }], weekDaysFormat: [{
1429
- type: Input
1430
- }], isActive: [{
1431
- type: Input
1432
- }], disabledDates: [{
1433
- type: Input
1434
- }], activeView: [{
1435
- type: Input
1436
- }], bottomView: [{
1437
- type: Input
1438
- }], topView: [{
1439
- type: Input
1440
- }], showViewHeader: [{
1441
- type: Input
1442
- }], animateNavigation: [{
1443
- type: Input
1444
- }], weekNumber: [{
1445
- type: Input
1446
- }], activeRangeEnd: [{
1447
- type: Input
1448
- }], selectionRange: [{
1449
- type: Input
1450
- }], views: [{
1451
- type: Input
1452
- }], orientation: [{
1453
- type: Input
1454
- }], activeViewChange: [{
1455
- type: Output
1456
- }], navigate: [{
1457
- type: Output
1458
- }], cellEnter: [{
1459
- type: Output
1460
- }], cellLeave: [{
1461
- type: Output
1462
- }], valueChange: [{
1463
- type: Output
1464
- }], rangeSelectionChange: [{
1465
- type: Output
1466
- }], blurEvent: [{
1467
- type: Output,
1468
- args: ['blur']
1469
- }], focusEvent: [{
1470
- type: Output,
1471
- args: ['focus']
1472
- }], focusCalendar: [{
1473
- type: Output
1474
- }], onClosePopup: [{
1475
- type: Output
1476
- }], onTabPress: [{
1477
- type: Output
1478
- }], onShiftTabPress: [{
1479
- type: Output
1480
- }], cellTemplate: [{
1481
- type: ContentChild,
1482
- args: [CellTemplateDirective, { static: false }]
1483
- }], cellTemplateRef: [{
1484
- type: Input,
1485
- args: ['cellTemplate']
1486
- }], monthCellTemplate: [{
1487
- type: ContentChild,
1488
- args: [MonthCellTemplateDirective, { static: false }]
1489
- }], monthCellTemplateRef: [{
1490
- type: Input,
1491
- args: ['monthCellTemplate']
1492
- }], yearCellTemplate: [{
1493
- type: ContentChild,
1494
- args: [YearCellTemplateDirective, { static: false }]
1495
- }], yearCellTemplateRef: [{
1496
- type: Input,
1497
- args: ['yearCellTemplate']
1498
- }], decadeCellTemplate: [{
1499
- type: ContentChild,
1500
- args: [DecadeCellTemplateDirective, { static: false }]
1501
- }], decadeCellTemplateRef: [{
1502
- type: Input,
1503
- args: ['decadeCellTemplate']
1504
- }], centuryCellTemplate: [{
1505
- type: ContentChild,
1506
- args: [CenturyCellTemplateDirective, { static: false }]
1507
- }], centuryCellTemplateRef: [{
1508
- type: Input,
1509
- args: ['centuryCellTemplate']
1510
- }], weekNumberTemplate: [{
1511
- type: ContentChild,
1512
- args: [WeekNumberCellTemplateDirective, { static: false }]
1513
- }], weekNumberTemplateRef: [{
1514
- type: Input,
1515
- args: ['weekNumberTemplate']
1516
- }], headerTitleTemplate: [{
1517
- type: ContentChild,
1518
- args: [HeaderTitleTemplateDirective, { static: false }]
1519
- }], headerTemplate: [{
1520
- type: ContentChild,
1521
- args: [HeaderTemplateDirective]
1522
- }], footerTemplate: [{
1523
- type: ContentChild,
1524
- args: [FooterTemplateDirective]
1525
- }], footerTemplateRef: [{
1526
- type: Input,
1527
- args: ['footerTemplate']
1528
- }], headerTitleTemplateRef: [{
1529
- type: Input,
1530
- args: ['headerTitleTemplate']
1531
- }], headerTemplateRef: [{
1532
- type: Input,
1533
- args: ['headerTemplate']
1534
- }], headerElement: [{
1535
- type: ViewChild,
1536
- args: [HeaderComponent, { static: false, read: ElementRef }]
1537
- }], viewList: [{
1538
- type: ViewChild,
1539
- args: [HorizontalViewListComponent, { static: false }]
1540
- }], widgetId: [{
1541
- type: HostBinding,
1542
- args: ['attr.id']
1543
- }], ariaDisabled: [{
1544
- type: HostBinding,
1545
- args: ['attr.aria-disabled']
1546
- }, {
1547
- type: HostBinding,
1548
- args: ['class.k-disabled']
1549
- }], handleMouseEnter: [{
1550
- type: HostListener,
1551
- args: ["mouseenter"]
1552
- }], handleMouseLeave: [{
1553
- type: HostListener,
1554
- args: ["mouseleave"]
1555
- }], handleMousedown: [{
1556
- type: HostListener,
1557
- args: ["mousedown", ['$event']]
1558
- }], handleClick: [{
1559
- type: HostListener,
1560
- args: ["click"]
1561
- }], keydown: [{
1562
- type: HostListener,
1563
- args: ["keydown", ["$event"]]
1564
- }] } });