@progress/kendo-angular-dateinputs 21.4.1 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,223 +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 { ChangeDetectorRef, Directive, ElementRef, EventEmitter, Optional, Input, Output, Renderer2 } from '@angular/core';
6
- import { Subscription, fromEvent } from 'rxjs';
7
- import { DateRangeService } from './date-range.service';
8
- import { MultiViewCalendarComponent } from '../calendar/multiview-calendar.component';
9
- import { EMPTY_SELECTIONRANGE } from '../calendar/models/selection-range.interface';
10
- import { isEqual } from '@progress/kendo-date-math';
11
- import { clampRange, either, isEqualRange } from '../util';
12
- import * as i0 from "@angular/core";
13
- import * as i1 from "../calendar/multiview-calendar.component";
14
- import * as i2 from "./date-range.service";
15
- /**
16
- * Manages the MultiViewCalendar range selection.
17
- * This directive will be `deprecated` in a future version.
18
- * Use the MultiViewCalendar [range selection]({% slug selection_multiviewcalendar %}#toc-range-selection) instead.
19
- */
20
- export class DateRangeSelectionDirective {
21
- calendar;
22
- cdr;
23
- element;
24
- dateRangeService;
25
- /**
26
- * Specifies the auto-correction behavior. If the start date is greater than the end date,
27
- * the directive corrects the date range to a single date either on input change or on blur
28
- * ([see example](slug:autocorrect_daterange#toc-calendar-selection-directive)).
29
- *
30
- * By default, the auto-correction triggers on change.
31
- * To disable this behavior, set the `autoCorrectOn` property to `none`.
32
- *
33
- * @default 'change'
34
- */
35
- autoCorrectOn = 'change';
36
- /**
37
- * Gets or sets the selection range of the calendar. When you set a new range,
38
- * the connected DateRangeService notifies all related parties.
39
- */
40
- get selectionRange() {
41
- return this.calendar ? this.calendar.selectionRange : null;
42
- }
43
- set selectionRange(range) {
44
- if (!this.isEqualCalendarRange(range)) {
45
- this.setSelectionRange(range);
46
- }
47
- if (!isEqualRange(this.dateRangeService.selectionRange, range)) {
48
- this.dateRangeService.setRange(range);
49
- }
50
- this.updateFocusedDate(range);
51
- }
52
- /**
53
- * Gets or sets the active end of the selection range. This option determines which range end will be updated on
54
- * user interaction. When a new active end is set, the connected DateRangeService notifies all related parties.
55
- */
56
- /**
57
- * Specifies which end of the selection range is marked as active. The active end gets modified when you interact with the component. When you set a new active end, the wired DateRangeService notifies all related components. For
58
- * example, the start and end DateInput components.
59
- *
60
- * > If the selection range is undefined, the value is ignored.
61
- */
62
- get activeRangeEnd() {
63
- return this.calendar.activeRangeEnd;
64
- }
65
- set activeRangeEnd(activeRange) {
66
- if (this.dateRangeService.activeRangeEnd === activeRange) {
67
- return;
68
- }
69
- this.calendar.activeRangeEnd = activeRange;
70
- this.dateRangeService.setActiveRangeEnd(activeRange);
71
- }
72
- /**
73
- * @hidden
74
- * When in adaptive mode range should not be set automatically on calendar value change but only on accept
75
- */
76
- shouldSetRange = true;
77
- /**
78
- * Fires when the active range end changes. For more information, refer to
79
- * the section on [events](slug:events_multiviewcalendar).
80
- */
81
- activeRangeEndChange = new EventEmitter();
82
- /**
83
- * Fires when the selection range changes. For more information, refer to
84
- * the section on [events](slug:events_multiviewcalendar).
85
- */
86
- selectionRangeChange = new EventEmitter();
87
- get calendarRange() {
88
- return this.selectionRange || EMPTY_SELECTIONRANGE;
89
- }
90
- calendarSubscriptions = new Subscription();
91
- range;
92
- constructor(calendar, cdr, element, renderer, dateRangeService) {
93
- this.calendar = calendar;
94
- this.cdr = cdr;
95
- this.element = element;
96
- this.dateRangeService = dateRangeService;
97
- this.dateRangeService = this.dateRangeService || new DateRangeService(renderer);
98
- renderer.setAttribute(element.nativeElement, 'aria-multiselectable', 'true');
99
- }
100
- ngOnInit() {
101
- const calendar = this.calendar;
102
- const dateRangeService = this.dateRangeService;
103
- calendar.min = either(dateRangeService.min, calendar.min);
104
- calendar.max = either(dateRangeService.max, calendar.max);
105
- this.addSubscriptions(calendar.cellEnter.subscribe((value) => this.handleHover(value)), calendar.valueChange.subscribe((value) => this.handleChange(value)), dateRangeService.focusedDate$.subscribe(focusedDate => {
106
- if (!isEqual(calendar.focusedDate, focusedDate)) {
107
- calendar.focusedDate = focusedDate;
108
- }
109
- }), dateRangeService.activeRangeEnd$.subscribe(rangeEnd => {
110
- if (calendar.activeRangeEnd === rangeEnd) {
111
- return;
112
- }
113
- calendar.activeRangeEnd = rangeEnd;
114
- this.activeRangeEndChange.emit(rangeEnd);
115
- this.cdr.markForCheck();
116
- }), dateRangeService.range$.subscribe(range => {
117
- if (!this.isEqualCalendarRange(range)) {
118
- this.acceptAndEmit(range);
119
- }
120
- this.updateFocusedDate(range);
121
- }), fromEvent(this.element.nativeElement, 'blur').subscribe(() => this.handleBlur()));
122
- }
123
- ngOnDestroy() {
124
- this.calendarSubscriptions.unsubscribe();
125
- }
126
- /**
127
- * @hidden
128
- */
129
- handleChange(value) {
130
- const service = this.dateRangeService;
131
- const autoCorrect = this.autoCorrectOn === 'change' && this.shouldAutoCorrect(value);
132
- const activeEnd = this.calendar.activeRangeEnd !== 'end' ? 'end' : (autoCorrect ? 'end' : 'start');
133
- this.range = autoCorrect ? clampRange(value) : this.updateRange(value);
134
- if (!isEqualRange(service.selectionRange, this.range)) {
135
- this.acceptAndEmit(this.range);
136
- service.setActiveRangeEnd(activeEnd);
137
- if (this.shouldSetRange) {
138
- this.setRange();
139
- }
140
- }
141
- }
142
- setRange(range) {
143
- this.dateRangeService.setRange(this.range ? this.range : range);
144
- }
145
- addSubscriptions(...subscriptions) {
146
- subscriptions.forEach(s => this.calendarSubscriptions.add(s));
147
- }
148
- isEqualCalendarRange(range) {
149
- return isEqualRange(this.calendar.selectionRange, range);
150
- }
151
- handleBlur() {
152
- const { start, end } = this.calendarRange;
153
- const autoCorrect = this.autoCorrectOn === 'blur' && start !== null && end !== null && end < start;
154
- if (autoCorrect) {
155
- this.dateRangeService.setRange(clampRange(start));
156
- }
157
- }
158
- handleHover(value) {
159
- if (this.hasCompleteRange()) {
160
- return;
161
- }
162
- const { start, end } = this.calendarRange;
163
- const activeRangeEnd = this.calendar.activeRangeEnd;
164
- const updateRange = (start && activeRangeEnd === 'end') || (end && activeRangeEnd === 'start');
165
- if (updateRange) {
166
- this.setSelectionRange(this.updateRange(value));
167
- }
168
- }
169
- hasCompleteRange() {
170
- const { start, end } = this.dateRangeService.selectionRange || EMPTY_SELECTIONRANGE;
171
- return Boolean(start) && Boolean(end);
172
- }
173
- shouldAutoCorrect(value) {
174
- const { end, start } = this.calendarRange;
175
- if (this.calendar.activeRangeEnd !== 'end') {
176
- return end !== null && value > end;
177
- }
178
- else {
179
- return start !== null && value < start;
180
- }
181
- }
182
- updateFocusedDate(range) {
183
- if (!range || this.dateRangeService.focusedDate) {
184
- return;
185
- }
186
- this.dateRangeService.setFocusedDate(range.start || range.end);
187
- }
188
- updateRange(value) {
189
- const { end, start } = this.calendarRange;
190
- return this.calendar.activeRangeEnd !== 'end' ? ({ start: value, end }) : ({ start, end: value });
191
- }
192
- setSelectionRange(range) {
193
- this.calendar.selectionRange = range;
194
- this.calendar.writeValue(null);
195
- }
196
- acceptAndEmit(range) {
197
- this.setSelectionRange(range);
198
- this.selectionRangeChange.emit(range);
199
- }
200
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeSelectionDirective, deps: [{ token: i1.MultiViewCalendarComponent }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.DateRangeService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
201
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: DateRangeSelectionDirective, isStandalone: true, selector: "[kendoDateRangeSelection]", inputs: { autoCorrectOn: "autoCorrectOn", selectionRange: "selectionRange", activeRangeEnd: "activeRangeEnd", shouldSetRange: "shouldSetRange" }, outputs: { activeRangeEndChange: "activeRangeEndChange", selectionRangeChange: "selectionRangeChange" }, ngImport: i0 });
202
- }
203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeSelectionDirective, decorators: [{
204
- type: Directive,
205
- args: [{
206
- selector: '[kendoDateRangeSelection]',
207
- standalone: true
208
- }]
209
- }], ctorParameters: () => [{ type: i1.MultiViewCalendarComponent }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.DateRangeService, decorators: [{
210
- type: Optional
211
- }] }], propDecorators: { autoCorrectOn: [{
212
- type: Input
213
- }], selectionRange: [{
214
- type: Input
215
- }], activeRangeEnd: [{
216
- type: Input
217
- }], shouldSetRange: [{
218
- type: Input
219
- }], activeRangeEndChange: [{
220
- type: Output
221
- }], selectionRangeChange: [{
222
- type: Output
223
- }] } });
@@ -1,109 +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 { Directive, ElementRef, Input, Renderer2, NgZone } from '@angular/core';
6
- import { cloneDate, isEqual } from '@progress/kendo-date-math';
7
- import { DateInputComponent } from '../dateinput/dateinput.component';
8
- import { DateRangeInput } from './date-range-input';
9
- import { DateRangeService } from './date-range.service';
10
- import { EMPTY_SELECTIONRANGE } from '../calendar/models/selection-range.interface';
11
- import { clampRange, isInRange } from '../util';
12
- import { attributeNames } from '../common/utils';
13
- import * as i0 from "@angular/core";
14
- import * as i1 from "./date-range.service";
15
- import * as i2 from "../dateinput/dateinput.component";
16
- /**
17
- * Represents a directive that manages the start selection range for date range inputs.
18
- *
19
- * You can use the DateRangeStartInputDirective only with a DateInput component.
20
- *
21
- * @example
22
- * ```typescript
23
- * @Component({
24
- * selector: 'my-app',
25
- * template: `
26
- * <kendo-daterange>
27
- * <kendo-dateinput kendoDateRangeStartInput [(value)]="startDate"></kendo-dateinput>
28
- * <kendo-dateinput kendoDateRangeEndInput [(value)]="endDate"></kendo-dateinput>
29
- * </kendo-daterange>
30
- * `
31
- * })
32
- * export class AppComponent {
33
- * public startDate: Date = new Date();
34
- * public endDate: Date = new Date();
35
- * }
36
- * ```
37
- *
38
- * @remarks
39
- * Applied to: {@link DateInputComponent}
40
- */
41
- export class DateRangeStartInputDirective extends DateRangeInput {
42
- rangeService;
43
- dateInput;
44
- renderer;
45
- /**
46
- * Specifies when the component automatically corrects invalid date ranges.
47
- * When the start date is greater than the end date, the component fixes the range to a single date either on input change or on blur ([see example](slug:autocorrect_daterange#toc-input-directives)).
48
- *
49
- * By default, the component does not perform any auto-correction.
50
- *
51
- */
52
- autoCorrectOn;
53
- /**
54
- * Determines how the calendar navigates when you focus on the input.
55
- * When you set `navigateCalendarOnFocus` to `true`, the calendar moves to the value of the focused input.
56
- * When you set it to `false`, the calendar shows the last selected date.
57
- *
58
- * @default false
59
- */
60
- navigateCalendarOnFocus = false;
61
- constructor(rangeService, dateInput, element, renderer, zone) {
62
- super('start', rangeService, dateInput, element, renderer, zone);
63
- this.rangeService = rangeService;
64
- this.dateInput = dateInput;
65
- this.renderer = renderer;
66
- }
67
- ngOnInit() {
68
- this.rangeService.registerStartInput(this.dateInput);
69
- super.init();
70
- this.dateInput.pickerType = 'daterangestart';
71
- }
72
- ngAfterViewInit() {
73
- this.renderer.setAttribute(this.dateInput.inputElement, attributeNames.ariaExpanded, 'false');
74
- }
75
- ngOnDestroy() {
76
- super.destroy();
77
- }
78
- getRange(value, correctOn) {
79
- const { min, max } = this.dateInput;
80
- if (!isInRange(value, min, max)) {
81
- return null;
82
- }
83
- const { end } = this.rangeService.selectionRange || EMPTY_SELECTIONRANGE;
84
- const shouldClamp = this.autoCorrectOn === correctOn && end && value > end;
85
- return shouldClamp ? clampRange(value) : { start: cloneDate(value), end };
86
- }
87
- updateInputValue(range) {
88
- const { start } = range || EMPTY_SELECTIONRANGE;
89
- const { min, max } = this.dateInput;
90
- if (isEqual(this.dateInput.value, start) || !isInRange(start, min, max)) {
91
- return;
92
- }
93
- this.dateInput.writeValue(cloneDate(start));
94
- this.dateInput.notify();
95
- }
96
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeStartInputDirective, deps: [{ token: i1.DateRangeService }, { token: i2.DateInputComponent }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
97
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: DateRangeStartInputDirective, isStandalone: true, selector: "[kendoDateRangeStartInput]", inputs: { autoCorrectOn: "autoCorrectOn", navigateCalendarOnFocus: "navigateCalendarOnFocus" }, usesInheritance: true, ngImport: i0 });
98
- }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeStartInputDirective, decorators: [{
100
- type: Directive,
101
- args: [{
102
- selector: '[kendoDateRangeStartInput]',
103
- standalone: true
104
- }]
105
- }], ctorParameters: () => [{ type: i1.DateRangeService }, { type: i2.DateInputComponent }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { autoCorrectOn: [{
106
- type: Input
107
- }], navigateCalendarOnFocus: [{
108
- type: Input
109
- }] } });
@@ -1,116 +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, ContentChildren, QueryList, HostBinding, HostListener, Input } from '@angular/core';
6
- import { validatePackage } from '@progress/kendo-licensing';
7
- import { packageMetadata } from '../package-metadata';
8
- import { DateRangePopupComponent } from './date-range-popup.component';
9
- import { DateRangeService } from './date-range.service';
10
- import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "./date-range.service";
13
- /**
14
- * Represents the Kendo UI DateRange component for Angular.
15
- *
16
- * @example
17
- * ```ts
18
- * _@Component({
19
- * selector: 'my-app',
20
- * template: `
21
- * <kendo-daterange>
22
- * <kendo-dateinput kendoDateRangeStartInput [(value)]="dateRange.start"></kendo-dateinput>
23
- * <kendo-dateinput kendoDateRangeEndInput [(value)]="dateRange.end"></kendo-dateinput>
24
- * </kendo-daterange>
25
- * `
26
- * })
27
- * export class AppComponent {
28
- * public dateRange: any = { start: null, end: null };
29
- * }
30
- * ```
31
- *
32
- * @remarks
33
- * Supported children components are: {@link DateRangePopupComponent}, {@link DateRangePopupCustomMessagesComponent}, {@link DateInputComponent}.
34
- */
35
- export class DateRangeComponent {
36
- dateRangeService;
37
- /**
38
- * @hidden
39
- *
40
- * TODO: Make visible when the Infinite Calendar is fixed to set properly the size option.
41
- * Sets the size of the component.
42
- *
43
- * @default 'medium'
44
- */
45
- size;
46
- /**
47
- * @hidden
48
- */
49
- keydown(event) {
50
- const code = normalizeKeys(event);
51
- const shouldOpenPopup = code === Keys.ArrowDown && event.altKey;
52
- if (shouldOpenPopup) {
53
- this.dateRangeService.activatePopup();
54
- }
55
- const shouldClosePopup = (code === Keys.ArrowUp && event.altKey) || code === Keys.Escape;
56
- if (shouldClosePopup) {
57
- this.dateRangeService.deactivatePopup();
58
- }
59
- }
60
- wrapperClass = true;
61
- /**
62
- * @hidden
63
- */
64
- showDefault = false;
65
- contentPopup;
66
- get hasContentPopup() {
67
- return this.contentPopup.length > 0;
68
- }
69
- subscription;
70
- constructor(dateRangeService) {
71
- this.dateRangeService = dateRangeService;
72
- validatePackage(packageMetadata);
73
- }
74
- ngAfterContentInit() {
75
- this.showDefault = !this.hasContentPopup;
76
- this.subscription = this.contentPopup.changes.subscribe(() => {
77
- this.showDefault = !this.hasContentPopup;
78
- });
79
- }
80
- ngOnDestroy() {
81
- this.subscription?.unsubscribe();
82
- }
83
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeComponent, deps: [{ token: i1.DateRangeService }], target: i0.ɵɵFactoryTarget.Component });
84
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DateRangeComponent, isStandalone: true, selector: "kendo-daterange", inputs: { size: "size" }, host: { listeners: { "keydown": "keydown($event)" }, properties: { "class.k-daterangepicker": "this.wrapperClass" } }, providers: [DateRangeService], queries: [{ propertyName: "contentPopup", predicate: DateRangePopupComponent }], ngImport: i0, template: `
85
- <ng-content></ng-content>
86
- @if (showDefault) {
87
- <kendo-daterange-popup [size]="size"></kendo-daterange-popup>
88
- }
89
- `, isInline: true, dependencies: [{ kind: "component", type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: ["showCalendarHeader", "focusedDate", "disabledDates", "activeView", "bottomView", "topView", "min", "max", "allowReverse", "animateNavigation", "disabled", "views", "weekNumber", "animate", "anchor", "anchorAlign", "showViewHeader", "showOtherMonthDays", "appendTo", "collision", "popupAlign", "margin", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "size"], outputs: ["open", "close", "blur", "focus", "cancel"], exportAs: ["kendo-daterange-popup"] }] });
90
- }
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeComponent, decorators: [{
92
- type: Component,
93
- args: [{
94
- providers: [DateRangeService],
95
- selector: 'kendo-daterange',
96
- template: `
97
- <ng-content></ng-content>
98
- @if (showDefault) {
99
- <kendo-daterange-popup [size]="size"></kendo-daterange-popup>
100
- }
101
- `,
102
- standalone: true,
103
- imports: [DateRangePopupComponent]
104
- }]
105
- }], ctorParameters: () => [{ type: i1.DateRangeService }], propDecorators: { size: [{
106
- type: Input
107
- }], keydown: [{
108
- type: HostListener,
109
- args: ['keydown', ['$event']]
110
- }], wrapperClass: [{
111
- type: HostBinding,
112
- args: ['class.k-daterangepicker']
113
- }], contentPopup: [{
114
- type: ContentChildren,
115
- args: [DateRangePopupComponent]
116
- }] } });
@@ -1,103 +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 { NgModule } from '@angular/core';
6
- import { KENDO_DATERANGE } from '../directives';
7
- import { PopupService } from '@progress/kendo-angular-popup';
8
- import { CenturyViewService } from '../calendar/services/century-view.service';
9
- import { DecadeViewService } from '../calendar/services/decade-view.service';
10
- import { MonthViewService } from '../calendar/services/month-view.service';
11
- import { NavigationService } from '../calendar/services/navigation.service';
12
- import { YearViewService } from '../calendar/services/year-view.service';
13
- import { IconsService } from '@progress/kendo-angular-icons';
14
- import { ResizeBatchService } from '@progress/kendo-angular-common';
15
- import { AdaptiveService } from '@progress/kendo-angular-utils';
16
- import * as i0 from "@angular/core";
17
- import * as i1 from "./localization/daterange-popup-custom-messages.component";
18
- import * as i2 from "../dateinput/localization/dateinput-custom-messages.component";
19
- import * as i3 from "../dateinput/dateinput.component";
20
- import * as i4 from "./date-range-end-input.directive";
21
- import * as i5 from "./date-range-popup-template.directive";
22
- import * as i6 from "./date-range.component";
23
- import * as i7 from "./date-range-popup.component";
24
- import * as i8 from "./date-range-selection.directive";
25
- import * as i9 from "./date-range-start-input.directive";
26
- // IMPORTANT: NgModule export kept for backwards compatibility
27
- /**
28
- * The exported package module.
29
- *
30
- * The package exports:
31
- * - `DateRangeComponent`&mdash;The DateRange component class.
32
- * - `DateRangePopupComponent`&mdash;The DateRangePopup component class.
33
- * - `DateRangeSelectionDirective`&mdash;The MultiviewCalendar date range selection directive.
34
- * - `DateRangeEndInputDirective`&mdash;The end DateInput date range selection directive.
35
- * - `DateRangeStartInputDirective`&mdash;The start DateInput date range selection directive.
36
- * - `DateRangePopupTemplateDirective`&mdash;The DateRangePopup content template directive.
37
- *
38
- * @example
39
- *
40
- * ```ts-no-run
41
- * // Import the DateRange module
42
- * import { DateRangeModule } from '@progress/kendo-angular-dateinputs';
43
- *
44
- * // The browser platform with a compiler
45
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
46
- *
47
- * import { NgModule } from '@angular/core';
48
- *
49
- * // Import the app component
50
- * import { AppComponent } from './app.component';
51
- *
52
- * // Define the app module
53
- * _@NgModule({
54
- * declarations: [AppComponent], // declare app component
55
- * imports: [BrowserModule, DateRangeModule], // import DateRange module
56
- * bootstrap: [AppComponent]
57
- * })
58
- * export class AppModule {}
59
- *
60
- * // Compile and launch the module
61
- * platformBrowserDynamic().bootstrapModule(AppModule);
62
- *
63
- * ```
64
- */
65
- export class DateRangeModule {
66
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
67
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: DateRangeModule, imports: [i1.DateRangePopupCustomMessagesComponent, i2.DateInputCustomMessagesComponent, i3.DateInputComponent, i4.DateRangeEndInputDirective, i5.DateRangePopupTemplateDirective, i6.DateRangeComponent, i7.DateRangePopupComponent, i8.DateRangeSelectionDirective, i9.DateRangeStartInputDirective], exports: [i1.DateRangePopupCustomMessagesComponent, i2.DateInputCustomMessagesComponent, i3.DateInputComponent, i4.DateRangeEndInputDirective, i5.DateRangePopupTemplateDirective, i6.DateRangeComponent, i7.DateRangePopupComponent, i8.DateRangeSelectionDirective, i9.DateRangeStartInputDirective] });
68
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeModule, providers: [
69
- // MultiViewCalendarModule providers
70
- PopupService,
71
- NavigationService,
72
- CenturyViewService,
73
- DecadeViewService,
74
- MonthViewService,
75
- YearViewService,
76
- // DateInputModule providers
77
- IconsService,
78
- // AdaptiveModule providers
79
- ResizeBatchService,
80
- AdaptiveService
81
- ], imports: [i3.DateInputComponent, i6.DateRangeComponent, i7.DateRangePopupComponent] });
82
- }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DateRangeModule, decorators: [{
84
- type: NgModule,
85
- args: [{
86
- exports: [...KENDO_DATERANGE],
87
- imports: [...KENDO_DATERANGE],
88
- providers: [
89
- // MultiViewCalendarModule providers
90
- PopupService,
91
- NavigationService,
92
- CenturyViewService,
93
- DecadeViewService,
94
- MonthViewService,
95
- YearViewService,
96
- // DateInputModule providers
97
- IconsService,
98
- // AdaptiveModule providers
99
- ResizeBatchService,
100
- AdaptiveService
101
- ]
102
- }]
103
- }] });