@progress/kendo-vue-dateinputs 8.0.3-develop.1 → 8.0.3-develop.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PopupSettings.d.ts +21 -0
- package/calendar/components/Calendar.d.ts +206 -0
- package/calendar/components/CalendarCell.d.ts +70 -0
- package/calendar/components/CalendarHeaderTitle.d.ts +35 -0
- package/calendar/components/CalendarWeekCell.d.ts +35 -0
- package/calendar/components/Header.d.ts +175 -0
- package/calendar/components/View.d.ts +204 -0
- package/calendar/components/ViewList.d.ts +226 -0
- package/calendar/components/interfaces/CalendarComputed.d.ts +17 -0
- package/calendar/components/interfaces/CalendarData.d.ts +17 -0
- package/calendar/components/interfaces/CalendarEventArguments.d.ts +63 -0
- package/calendar/components/interfaces/CalendarMethods.d.ts +40 -0
- package/calendar/components/interfaces/CalendarProps.d.ts +66 -0
- package/calendar/components/interfaces/CalendarState.d.ts +32 -0
- package/calendar/models/ActiveView.d.ts +11 -0
- package/calendar/models/CalendarMode.d.ts +16 -0
- package/calendar/models/CalendarSettings.d.ts +84 -0
- package/calendar/models/CalendarViewEnum.d.ts +16 -0
- package/calendar/models/CellContext.d.ts +26 -0
- package/calendar/models/NavigationAction.d.ts +22 -0
- package/calendar/models/SelectionRange.d.ts +24 -0
- package/calendar/models/SelectionRangeEnd.d.ts +11 -0
- package/calendar/models/ViewService.d.ts +32 -0
- package/calendar/models/main.d.ts +17 -0
- package/calendar/services/BusViewService.d.ts +28 -0
- package/calendar/services/CenturyViewService.d.ts +32 -0
- package/calendar/services/DOMService.d.ts +36 -0
- package/calendar/services/DecadeViewService.d.ts +34 -0
- package/calendar/services/MonthViewService.d.ts +40 -0
- package/calendar/services/NavigationService.d.ts +20 -0
- package/calendar/services/WeekNamesService.d.ts +16 -0
- package/calendar/services/YearViewService.d.ts +38 -0
- package/calendar/services/main.d.ts +16 -0
- package/calendar/utils/main.d.ts +33 -0
- package/common/PickerWrap.d.ts +23 -0
- package/dateinput/DateInput.d.ts +260 -0
- package/dateinput/DateInput.mjs +3 -3
- package/dateinput/interfaces/DateInputBlurEvent.d.ts +16 -0
- package/dateinput/interfaces/DateInputComputed.d.ts +15 -0
- package/dateinput/interfaces/DateInputData.d.ts +18 -0
- package/dateinput/interfaces/DateInputEventArguments.d.ts +17 -0
- package/dateinput/interfaces/DateInputFocusEvent.d.ts +16 -0
- package/dateinput/interfaces/DateInputMethods.d.ts +37 -0
- package/dateinput/interfaces/DateInputProps.d.ts +38 -0
- package/dateinput/interfaces/DateInputState.d.ts +16 -0
- package/dateinput/models/DateInputSettings.d.ts +160 -0
- package/dateinput/models/format-placeholder.d.ts +46 -0
- package/dateinput/models/incremental-steps.d.ts +18 -0
- package/dateinput/models/kendo-date.d.ts +60 -0
- package/dateinput/models/main.d.ts +14 -0
- package/dateinput/models/mask.d.ts +14 -0
- package/dateinput/models/selection.d.ts +14 -0
- package/dateinput/utils.d.ts +37 -0
- package/datepicker/DatePicker.d.ts +280 -0
- package/datepicker/DatePicker.js +1 -1
- package/datepicker/DatePicker.mjs +11 -10
- package/datepicker/ToggleButton.d.ts +151 -0
- package/datepicker/interfaces/DatePickerComputed.d.ts +15 -0
- package/datepicker/interfaces/DatePickerData.d.ts +15 -0
- package/datepicker/interfaces/DatePickerEventArguments.d.ts +29 -0
- package/datepicker/interfaces/DatePickerFocusBlurEvents.d.ts +25 -0
- package/datepicker/interfaces/DatePickerMethods.d.ts +34 -0
- package/datepicker/interfaces/DatePickerProps.d.ts +53 -0
- package/datepicker/interfaces/DatePickerState.d.ts +23 -0
- package/datepicker/models/DatePickerSettings.d.ts +157 -0
- package/datepicker/models/main.d.ts +9 -0
- package/daterangepicker/DateRangePicker.d.ts +315 -0
- package/daterangepicker/interfaces/DateRangePickerFocusBlurEvents.d.ts +25 -0
- package/daterangepicker/models/DateRangePickerCalendarSettings.d.ts +13 -0
- package/daterangepicker/models/DateRangePickerDateInputSettings.d.ts +13 -0
- package/daterangepicker/models/DateRangePickerPopupSettings.d.ts +13 -0
- package/daterangepicker/models/DateRangePickerSettings.d.ts +162 -0
- package/daterangepicker/models/main.d.ts +12 -0
- package/datetimepicker/DateTimePicker.d.ts +380 -0
- package/datetimepicker/DateTimePicker.js +1 -1
- package/datetimepicker/DateTimePicker.mjs +17 -16
- package/datetimepicker/DateTimeSelector.d.ts +188 -0
- package/datetimepicker/interfaces/DateTimePickerFocusBlurEvents.d.ts +25 -0
- package/datetimepicker/models/DateTimePickerSettings.d.ts +199 -0
- package/datetimepicker/models/main.d.ts +9 -0
- package/defaults.d.ts +27 -0
- package/dist/cdn/js/kendo-vue-dateinputs.js +1 -1
- package/index.d.mts +30 -3477
- package/index.d.ts +30 -3477
- package/messages/main.d.ts +117 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +16 -10
- package/timepicker/TimeList.d.ts +129 -0
- package/timepicker/TimePart.d.ts +177 -0
- package/timepicker/TimePart.js +1 -1
- package/timepicker/TimePart.mjs +2 -2
- package/timepicker/TimePicker.d.ts +369 -0
- package/timepicker/TimePicker.js +1 -1
- package/timepicker/TimePicker.mjs +1 -0
- package/timepicker/TimeSelector.d.ts +185 -0
- package/timepicker/interfaces/TimePickerFocusBlurEvents.d.ts +25 -0
- package/timepicker/models/IncrementalSteps.d.ts +15 -0
- package/timepicker/models/ListItem.d.ts +14 -0
- package/timepicker/models/ListService.d.ts +22 -0
- package/timepicker/models/ListServiceSettings.d.ts +19 -0
- package/timepicker/models/TimePart.d.ts +17 -0
- package/timepicker/models/TimePickerSettings.d.ts +180 -0
- package/timepicker/models/main.d.ts +14 -0
- package/timepicker/services/DOMService.d.ts +17 -0
- package/timepicker/services/DayPeriodService.d.ts +54 -0
- package/timepicker/services/HoursService.d.ts +40 -0
- package/timepicker/services/MinutesService.d.ts +39 -0
- package/timepicker/services/SecondsService.d.ts +39 -0
- package/timepicker/services/main.d.ts +13 -0
- package/timepicker/utils.d.ts +63 -0
- package/utils.d.ts +77 -0
- package/utils.mjs +1 -1
- package/virtualization/Virtualization.d.ts +186 -0
- package/virtualization/Virtualization.js +1 -1
- package/virtualization/Virtualization.mjs +2 -2
- package/virtualization/services/RowHeightService.d.ts +25 -0
- package/virtualization/services/ScrollerService.d.ts +56 -0
- package/virtualization/services/main.d.ts +10 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { FormComponentProps, FormComponentValidity } from '@progress/kendo-vue-common';
|
|
9
|
+
import { DateTimePickerSettings } from './models/main';
|
|
10
|
+
import { DateTimeSelectorChangeEvent } from './DateTimeSelector';
|
|
11
|
+
import { DateInputChangeEvent } from '..';
|
|
12
|
+
import { DateInputFormatPlaceholder } from '../dateinput/models/main';
|
|
13
|
+
import { PropType } from 'vue';
|
|
14
|
+
import { DateTimePickerFocusEvent, DateTimePickerBlurEvent } from './interfaces/DateTimePickerFocusBlurEvents';
|
|
15
|
+
/**
|
|
16
|
+
* The arguments for the `onChange` event of the DateTimePicker.
|
|
17
|
+
*/
|
|
18
|
+
export interface DateTimePickerChangeEvent {
|
|
19
|
+
event: any;
|
|
20
|
+
value: Date | null;
|
|
21
|
+
show: boolean;
|
|
22
|
+
target: any;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The arguments for the `open` event of the DateTimePicker.
|
|
26
|
+
*/
|
|
27
|
+
export interface DateTimePickerOpenEvent {
|
|
28
|
+
component: any;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The arguments for the `close` event of the DateTimePicker.
|
|
32
|
+
*/
|
|
33
|
+
export interface DateTimePickerCloseEvent {
|
|
34
|
+
component: any;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Represents the props of the [Kendo UI for Vue DateTimePicker component]({% slug overview_datetimepicker %}).
|
|
38
|
+
*/
|
|
39
|
+
export interface DateTimePickerProps extends DateTimePickerSettings, FormComponentProps {
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
modelValue?: Date;
|
|
44
|
+
/**
|
|
45
|
+
* Sets the default value of the DateTimePicker.
|
|
46
|
+
*/
|
|
47
|
+
defaultValue?: Date;
|
|
48
|
+
/**
|
|
49
|
+
* Fires each time the user selects a new value
|
|
50
|
+
*/
|
|
51
|
+
onChange?: (event: DateTimePickerChangeEvent) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Specifies the value of the DateTimePicker
|
|
54
|
+
* ([see example]({% slug controlled_datetimepicker %}#toc-controlling-the-date-value)).
|
|
55
|
+
*
|
|
56
|
+
* > The `value` has to be a valid
|
|
57
|
+
* [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance.
|
|
58
|
+
*/
|
|
59
|
+
value?: Date | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @hidden
|
|
63
|
+
*/
|
|
64
|
+
export interface DateTimePickerComputed {
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
computedValue: Date | null;
|
|
67
|
+
computedShow: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
declare const DateTimePicker: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
73
|
+
modelValue: {
|
|
74
|
+
type: PropType<Date>;
|
|
75
|
+
default: any;
|
|
76
|
+
};
|
|
77
|
+
defaultShow: {
|
|
78
|
+
type: PropType<boolean>;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
defaultValue: {
|
|
82
|
+
type: PropType<Date>;
|
|
83
|
+
default: any;
|
|
84
|
+
};
|
|
85
|
+
disabled: {
|
|
86
|
+
type: PropType<boolean>;
|
|
87
|
+
default: boolean;
|
|
88
|
+
};
|
|
89
|
+
dateInput: {
|
|
90
|
+
type: PropType<any>;
|
|
91
|
+
default: () => any;
|
|
92
|
+
};
|
|
93
|
+
popup: {
|
|
94
|
+
type: PropType<any>;
|
|
95
|
+
default: () => any;
|
|
96
|
+
};
|
|
97
|
+
calendar: {
|
|
98
|
+
type: PropType<any>;
|
|
99
|
+
default: () => any;
|
|
100
|
+
};
|
|
101
|
+
focusedDate: PropType<Date>;
|
|
102
|
+
format: {
|
|
103
|
+
type: PropType<string | import('@progress/kendo-vue-intl').DateFormatOptions>;
|
|
104
|
+
default: () => string | object;
|
|
105
|
+
};
|
|
106
|
+
formatPlaceholder: {
|
|
107
|
+
type: PropType<DateInputFormatPlaceholder>;
|
|
108
|
+
default: () => DateInputFormatPlaceholder;
|
|
109
|
+
};
|
|
110
|
+
rounded: {
|
|
111
|
+
type: PropType<string>;
|
|
112
|
+
validator: (value: string) => boolean;
|
|
113
|
+
};
|
|
114
|
+
fillMode: {
|
|
115
|
+
type: PropType<string>;
|
|
116
|
+
validator: (value: string) => boolean;
|
|
117
|
+
};
|
|
118
|
+
size: {
|
|
119
|
+
type: PropType<"small" | "medium" | "large">;
|
|
120
|
+
validator: (value: string) => boolean;
|
|
121
|
+
};
|
|
122
|
+
id: PropType<string>;
|
|
123
|
+
ariaLabelledBy: PropType<string>;
|
|
124
|
+
ariaDescribedBy: PropType<string>;
|
|
125
|
+
min: {
|
|
126
|
+
type: PropType<Date>;
|
|
127
|
+
default: () => Date;
|
|
128
|
+
};
|
|
129
|
+
max: {
|
|
130
|
+
type: PropType<Date>;
|
|
131
|
+
default: () => Date;
|
|
132
|
+
};
|
|
133
|
+
maxTime: {
|
|
134
|
+
type: PropType<Date>;
|
|
135
|
+
default: () => Date;
|
|
136
|
+
};
|
|
137
|
+
minTime: {
|
|
138
|
+
type: PropType<Date>;
|
|
139
|
+
default: () => Date;
|
|
140
|
+
};
|
|
141
|
+
name: PropType<string>;
|
|
142
|
+
label: PropType<string>;
|
|
143
|
+
placeholder: PropType<string>;
|
|
144
|
+
popupSettings: {
|
|
145
|
+
type: PropType<object>;
|
|
146
|
+
default: () => {};
|
|
147
|
+
};
|
|
148
|
+
show: {
|
|
149
|
+
type: PropType<boolean>;
|
|
150
|
+
default: any;
|
|
151
|
+
};
|
|
152
|
+
tabIndex: {
|
|
153
|
+
type: PropType<number>;
|
|
154
|
+
default: number;
|
|
155
|
+
};
|
|
156
|
+
title: {
|
|
157
|
+
type: PropType<string>;
|
|
158
|
+
default: () => "";
|
|
159
|
+
};
|
|
160
|
+
steps: {
|
|
161
|
+
type: PropType<import('../timepicker/models/IncrementalSteps').TimePickerIncrementalSteps>;
|
|
162
|
+
default: () => {};
|
|
163
|
+
};
|
|
164
|
+
value: PropType<Date>;
|
|
165
|
+
weekNumber: {
|
|
166
|
+
type: PropType<boolean>;
|
|
167
|
+
default: boolean;
|
|
168
|
+
};
|
|
169
|
+
width: PropType<string | number>;
|
|
170
|
+
validationMessage: PropType<string>;
|
|
171
|
+
required: {
|
|
172
|
+
type: PropType<boolean>;
|
|
173
|
+
default: boolean;
|
|
174
|
+
};
|
|
175
|
+
validityStyles: {
|
|
176
|
+
type: PropType<boolean>;
|
|
177
|
+
default: boolean;
|
|
178
|
+
};
|
|
179
|
+
validate: PropType<boolean>;
|
|
180
|
+
valid: {
|
|
181
|
+
type: PropType<boolean>;
|
|
182
|
+
default: any;
|
|
183
|
+
};
|
|
184
|
+
cancelButton: {
|
|
185
|
+
type: PropType<boolean>;
|
|
186
|
+
default: boolean;
|
|
187
|
+
};
|
|
188
|
+
inputAttributes: PropType<Object>;
|
|
189
|
+
}>, {
|
|
190
|
+
kendoAnchorRef: import('vue').Ref<any, any>;
|
|
191
|
+
kendoLocalizationService: {};
|
|
192
|
+
}, {
|
|
193
|
+
currentValue: any;
|
|
194
|
+
currentShow: boolean;
|
|
195
|
+
valueDuringOnChange: any;
|
|
196
|
+
showDuringOnChange: any;
|
|
197
|
+
shouldFocusDateInput: boolean;
|
|
198
|
+
isFocused: boolean;
|
|
199
|
+
}, {
|
|
200
|
+
computedValue(): DateTimePickerComputed['computedValue'];
|
|
201
|
+
computedShow(): DateTimePickerComputed['computedShow'];
|
|
202
|
+
}, {
|
|
203
|
+
validity(): FormComponentValidity;
|
|
204
|
+
getDateInputText(): any;
|
|
205
|
+
focus(): void;
|
|
206
|
+
setShow(show: boolean): void;
|
|
207
|
+
handleReject(): void;
|
|
208
|
+
handleValueChange(event: DateInputChangeEvent | DateTimeSelectorChangeEvent): void;
|
|
209
|
+
handleFocus(event: FocusEvent): void;
|
|
210
|
+
handleBlur(event: FocusEvent): void;
|
|
211
|
+
timeSelectorBlur(event: FocusEvent): void;
|
|
212
|
+
timeSelectorFocus(): void;
|
|
213
|
+
createBlurTimeout(): void;
|
|
214
|
+
handleDateIconClick(event: any): void;
|
|
215
|
+
handleIconMouseDown(event: any): void;
|
|
216
|
+
handleKeyDown(event: any): void;
|
|
217
|
+
dateInputElement(): any;
|
|
218
|
+
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
219
|
+
changemodel: (value: Date | null) => true;
|
|
220
|
+
'update:modelValue': (value: Date | null) => true;
|
|
221
|
+
iconclick: (event: Event) => true;
|
|
222
|
+
change: (event: DateTimePickerChangeEvent) => true;
|
|
223
|
+
focus: (event: DateTimePickerFocusEvent) => true;
|
|
224
|
+
blur: (event: DateTimePickerBlurEvent) => true;
|
|
225
|
+
keydown: (event: KeyboardEvent) => true;
|
|
226
|
+
open: (event: DateTimePickerOpenEvent) => true;
|
|
227
|
+
close: (event: DateTimePickerCloseEvent) => true;
|
|
228
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
229
|
+
modelValue: {
|
|
230
|
+
type: PropType<Date>;
|
|
231
|
+
default: any;
|
|
232
|
+
};
|
|
233
|
+
defaultShow: {
|
|
234
|
+
type: PropType<boolean>;
|
|
235
|
+
default: boolean;
|
|
236
|
+
};
|
|
237
|
+
defaultValue: {
|
|
238
|
+
type: PropType<Date>;
|
|
239
|
+
default: any;
|
|
240
|
+
};
|
|
241
|
+
disabled: {
|
|
242
|
+
type: PropType<boolean>;
|
|
243
|
+
default: boolean;
|
|
244
|
+
};
|
|
245
|
+
dateInput: {
|
|
246
|
+
type: PropType<any>;
|
|
247
|
+
default: () => any;
|
|
248
|
+
};
|
|
249
|
+
popup: {
|
|
250
|
+
type: PropType<any>;
|
|
251
|
+
default: () => any;
|
|
252
|
+
};
|
|
253
|
+
calendar: {
|
|
254
|
+
type: PropType<any>;
|
|
255
|
+
default: () => any;
|
|
256
|
+
};
|
|
257
|
+
focusedDate: PropType<Date>;
|
|
258
|
+
format: {
|
|
259
|
+
type: PropType<string | import('@progress/kendo-vue-intl').DateFormatOptions>;
|
|
260
|
+
default: () => string | object;
|
|
261
|
+
};
|
|
262
|
+
formatPlaceholder: {
|
|
263
|
+
type: PropType<DateInputFormatPlaceholder>;
|
|
264
|
+
default: () => DateInputFormatPlaceholder;
|
|
265
|
+
};
|
|
266
|
+
rounded: {
|
|
267
|
+
type: PropType<string>;
|
|
268
|
+
validator: (value: string) => boolean;
|
|
269
|
+
};
|
|
270
|
+
fillMode: {
|
|
271
|
+
type: PropType<string>;
|
|
272
|
+
validator: (value: string) => boolean;
|
|
273
|
+
};
|
|
274
|
+
size: {
|
|
275
|
+
type: PropType<"small" | "medium" | "large">;
|
|
276
|
+
validator: (value: string) => boolean;
|
|
277
|
+
};
|
|
278
|
+
id: PropType<string>;
|
|
279
|
+
ariaLabelledBy: PropType<string>;
|
|
280
|
+
ariaDescribedBy: PropType<string>;
|
|
281
|
+
min: {
|
|
282
|
+
type: PropType<Date>;
|
|
283
|
+
default: () => Date;
|
|
284
|
+
};
|
|
285
|
+
max: {
|
|
286
|
+
type: PropType<Date>;
|
|
287
|
+
default: () => Date;
|
|
288
|
+
};
|
|
289
|
+
maxTime: {
|
|
290
|
+
type: PropType<Date>;
|
|
291
|
+
default: () => Date;
|
|
292
|
+
};
|
|
293
|
+
minTime: {
|
|
294
|
+
type: PropType<Date>;
|
|
295
|
+
default: () => Date;
|
|
296
|
+
};
|
|
297
|
+
name: PropType<string>;
|
|
298
|
+
label: PropType<string>;
|
|
299
|
+
placeholder: PropType<string>;
|
|
300
|
+
popupSettings: {
|
|
301
|
+
type: PropType<object>;
|
|
302
|
+
default: () => {};
|
|
303
|
+
};
|
|
304
|
+
show: {
|
|
305
|
+
type: PropType<boolean>;
|
|
306
|
+
default: any;
|
|
307
|
+
};
|
|
308
|
+
tabIndex: {
|
|
309
|
+
type: PropType<number>;
|
|
310
|
+
default: number;
|
|
311
|
+
};
|
|
312
|
+
title: {
|
|
313
|
+
type: PropType<string>;
|
|
314
|
+
default: () => "";
|
|
315
|
+
};
|
|
316
|
+
steps: {
|
|
317
|
+
type: PropType<import('../timepicker/models/IncrementalSteps').TimePickerIncrementalSteps>;
|
|
318
|
+
default: () => {};
|
|
319
|
+
};
|
|
320
|
+
value: PropType<Date>;
|
|
321
|
+
weekNumber: {
|
|
322
|
+
type: PropType<boolean>;
|
|
323
|
+
default: boolean;
|
|
324
|
+
};
|
|
325
|
+
width: PropType<string | number>;
|
|
326
|
+
validationMessage: PropType<string>;
|
|
327
|
+
required: {
|
|
328
|
+
type: PropType<boolean>;
|
|
329
|
+
default: boolean;
|
|
330
|
+
};
|
|
331
|
+
validityStyles: {
|
|
332
|
+
type: PropType<boolean>;
|
|
333
|
+
default: boolean;
|
|
334
|
+
};
|
|
335
|
+
validate: PropType<boolean>;
|
|
336
|
+
valid: {
|
|
337
|
+
type: PropType<boolean>;
|
|
338
|
+
default: any;
|
|
339
|
+
};
|
|
340
|
+
cancelButton: {
|
|
341
|
+
type: PropType<boolean>;
|
|
342
|
+
default: boolean;
|
|
343
|
+
};
|
|
344
|
+
inputAttributes: PropType<Object>;
|
|
345
|
+
}>> & Readonly<{
|
|
346
|
+
onBlur?: (event: DateTimePickerBlurEvent) => any;
|
|
347
|
+
onChange?: (event: DateTimePickerChangeEvent) => any;
|
|
348
|
+
onClose?: (event: DateTimePickerCloseEvent) => any;
|
|
349
|
+
onFocus?: (event: DateTimePickerFocusEvent) => any;
|
|
350
|
+
onKeydown?: (event: KeyboardEvent) => any;
|
|
351
|
+
onOpen?: (event: DateTimePickerOpenEvent) => any;
|
|
352
|
+
onChangemodel?: (value: Date) => any;
|
|
353
|
+
"onUpdate:modelValue"?: (value: Date) => any;
|
|
354
|
+
onIconclick?: (event: Event) => any;
|
|
355
|
+
}>, {
|
|
356
|
+
required: boolean;
|
|
357
|
+
title: string;
|
|
358
|
+
tabIndex: number;
|
|
359
|
+
calendar: any;
|
|
360
|
+
popup: any;
|
|
361
|
+
disabled: boolean;
|
|
362
|
+
weekNumber: boolean;
|
|
363
|
+
format: string | object;
|
|
364
|
+
max: Date;
|
|
365
|
+
min: Date;
|
|
366
|
+
defaultValue: Date;
|
|
367
|
+
show: boolean;
|
|
368
|
+
popupSettings: object;
|
|
369
|
+
modelValue: Date;
|
|
370
|
+
steps: import('../timepicker/models/IncrementalSteps').TimePickerIncrementalSteps;
|
|
371
|
+
maxTime: Date;
|
|
372
|
+
minTime: Date;
|
|
373
|
+
validityStyles: boolean;
|
|
374
|
+
valid: boolean;
|
|
375
|
+
formatPlaceholder: DateInputFormatPlaceholder;
|
|
376
|
+
defaultShow: boolean;
|
|
377
|
+
dateInput: any;
|
|
378
|
+
cancelButton: boolean;
|
|
379
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
380
|
+
export { DateTimePicker };
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),G=require("@progress/kendo-vue-labels"),J=require("@progress/kendo-vue-buttons"),Q=require("@progress/kendo-vue-popup"),r=require("@progress/kendo-date-math"),t=require("@progress/kendo-vue-common"),W=require("../dateinput/DateInput.js"),Y=require("../package-metadata.js"),u=require("../utils.js"),o=require("../messages/main.js"),T=require("@progress/kendo-vue-intl"),Z=require("./DateTimeSelector.js"),ee=require("../timepicker/utils.js"),b=require("../defaults.js"),te=require("../dateinput/utils.js"),ie=require("@progress/kendo-svg-icons");function m(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!n.isVNode(e)}const ne=n.defineComponent({name:"KendoDateTimePicker",emits:{changemodel:e=>!0,"update:modelValue":e=>!0,iconclick:e=>!0,change:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},props:{modelValue:{type:Date,default:void 0},defaultShow:{type:Boolean,default:!1},defaultValue:{type:Date,default:null},disabled:{type:Boolean,default:!1},dateInput:{type:[String,Object,Function],default:function(){}},popup:{type:[String,Object,Function],default:function(){}},calendar:{type:[String,Object,Function],default:function(){}},focusedDate:Date,format:{type:[String,Object],default:function(){return"g"}},formatPlaceholder:{type:[String,Object],default:function(){return te.defaultFormatPlaceholder}},rounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},fillMode:{type:String,validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,validator:function(e){return["none","small","medium","large"].includes(e)}},id:String,ariaLabelledBy:String,ariaDescribedBy:String,min:{type:Date,default:function(){return u.MIN_DATE}},max:{type:Date,default:function(){return u.MAX_DATE}},maxTime:{type:Date,default:function(){return r.cloneDate(u.MAX_TIME)}},minTime:{type:Date,default:function(){return r.cloneDate(b.MIN_TIME)}},name:String,label:String,placeholder:String,popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},tabIndex:{type:Number,default:0},title:{type:String,default:function(){return""}},steps:{type:Object,default:function(){return{}}},value:Date,weekNumber:{type:Boolean,default:!1},width:String,validationMessage:String,required:{type:Boolean,default:!1},validityStyles:{type:Boolean,default:!0},validate:Boolean,valid:{type:Boolean,default:void 0},cancelButton:{type:Boolean,default:!0},inputAttributes:Object},model:{event:"changemodel"},created(){this._anchor=t.guid(),this._popupId="popup"+t.guid(),this._wrapper=null,this._dateInput=null,this._dateTimeSelector=null,t.validatePackage(Y.packageMetadata),this.currentValue=this.$props.defaultValue,this.currentShow=this.$props.defaultShow},inject:{kendoLocalizationService:{default:null}},data(){return{currentValue:null,currentShow:!1,valueDuringOnChange:void 0,showDuringOnChange:void 0,shouldFocusDateInput:!1,isFocused:!1}},computed:{computedValue(){const e=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.$props.value!==void 0?this.$props.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.$data.currentValue;return e!==null?r.cloneDate(e):null},computedShow(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.$props.show!==void 0?this.$props.show:this.currentShow}},watch:{show:function(e,i){this._oldShow=i},currentShow:function(e,i){this._oldShow=i}},mounted(){this.computedShow&&this.$forceUpdate();const e=this.dateInputElement();this._dateTimeSelector=this.$refs.dateTimeSelector,this._wrapper=this.kendoAnchorRef,this._dateInput=this.dateInputRef,e&&e.setAttribute("aria-haspopup","true")},updated(){const e=this.dateInputElement();this._dateTimeSelector=this.$refs.dateTimeSelector,this._wrapper=this.kendoAnchorRef,this._dateTimeSelector&&this.computedShow&&!this._oldShow&&this._dateTimeSelector.focus({preventScroll:!0}),e&&!this.computedShow&&this.shouldFocusDateInput&&this._dateInput.focus({preventScroll:!0}),this.shouldFocusDateInput=!1},setup(){const e=n.ref(null),i=n.inject("kendoLocalizationService",{});return{kendoAnchorRef:e,kendoLocalizationService:i}},render(){const e=t.getDefaultSlots(this),{disabled:i,tabIndex:a,title:d,id:f,format:g,formatPlaceholder:$,min:k,max:V,weekNumber:_,focusedDate:M,width:S,name:B,steps:v,placeholder:C,validationMessage:q,required:F,validityStyles:O,cancelButton:R,minTime:D,maxTime:w,ariaLabelledBy:ae,ariaDescribedBy:oe,size:p,fillMode:I,rounded:c,inputAttributes:x}=this.$props,{popupClass:E,appendTo:A,animate:j}=this.$props.popupSettings,y=!this.$props.validityStyles||this.validity().valid,N=this.$props.dateInput?t.templateRendering.call(this,this.$props.dateInput,t.getListeners.call(this)):void 0,P=n.createVNode(W.DateInput,{ref:h=>{this.dateInputRef=h},placeholder:C,disabled:i,format:g,formatPlaceholder:$,id:f,max:V,min:k,minTime:D,maxTime:w,name:B,size:null,rounded:null,fillMode:null,onChange:this.handleValueChange,required:F,steps:v,tabIndex:this.computedShow?-1:a,title:d,valid:this.validity().valid,validationMessage:q,validityStyles:O,value:this.computedValue,ariaHasPopup:"dialog",ariaExpanded:this.computedShow,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:x},m(e)?e:{default:()=>[e]}),L=t.getTemplate.call(this,{h:n.h,template:N,defaultRendering:P}),K=this.$props.calendar?t.templateRendering.call(this,this.$props.calendar,t.getListeners.call(this)):void 0,s=n.createVNode(Z.DateTimeSelector,{ref:"dateTimeSelector",cancelButton:R,value:this.computedValue,onChange:this.handleValueChange,onReject:this.handleReject,disabled:i,weekNumber:_,min:this.$props.min,max:this.$props.max,minTime:D,maxTime:w,focusedDate:M,format:g,calendar:K,steps:v,onFocus:this.timeSelectorFocus,onBlur:this.timeSelectorBlur,onKeydown:this.handleKeyDown},null),z=t.classNames("k-datetime-container k-reset",E),U=this.$props.popup?t.templateRendering.call(this,this.$props.popup,t.getListeners.call(this)):void 0,X=n.createVNode(Q.Popup,{show:this.computedShow,anchor:this._anchor,popupClass:z,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},appendTo:A,animate:j},m(s)?s:{default:()=>[s]}),H=t.getTemplate.call(this,{h:n.h,template:U,defaultRendering:X,defaultSlots:s}),l=n.createVNode("div",{class:t.classNames("k-input","k-datetimepicker",{[`k-input-${t.kendoThemeMaps.sizeMap[p]||p}`]:p,[`k-input-${I}`]:I,[`k-rounded-${t.kendoThemeMaps.roundedMap[c]||c}`]:c,"k-invalid":!y,"k-required":this.required,"k-disabled":this.$props.disabled}),ref:h=>{this.kendoAnchorRef=h},onKeydown:this.handleKeyDown,style:{width:S},onFocusin:this.handleFocus,onFocusout:this.handleBlur},[L,n.createVNode(J.Button,{type:"button",tabIndex:-1,icon:"calendar",svgIcon:ie.calendarIcon,onMousedown:this.handleIconMouseDown,onClick:this.handleDateIconClick,title:T.provideLocalizationService(this).toLanguageString(o.toggleDateTimeSelector,o.messages[o.toggleDateTimeSelector]),rounded:null,class:"k-input-button","aria-controls":this._popupId,"aria-label":T.provideLocalizationService(this).toLanguageString(o.toggleDateTimeSelector,o.messages[o.toggleDateTimeSelector])},null),H]);return this.$props.label?n.createVNode(G.FloatingLabel,{label:this.$props.label,editorId:f,editorValid:y,editorValue:this.getDateInputText(),editorPlaceholder:this.$props.placeholder,editorDisabled:this.$props.disabled,style:{width:S}},m(l)?l:{default:()=>[l]}):l},methods:{validity(){const e=u.isInDateRange(this.computedValue,this.$props.min,this.$props.max)&&ee.isInTimeRange(this.computedValue,this.$props.minTime||b.MIN_TIME,this.$props.maxTime||u.MAX_TIME),i=this.$props.validationMessage!==void 0,a=(!this.$props.required||this.computedValue!==null)&&e,d=this.$props.valid!==void 0?this.$props.valid:a;return{customError:i,rangeOverflow:this.computedValue&&this.$props.max.getTime()<this.computedValue.getTime()||!1,rangeUnderflow:this.computedValue&&this.computedValue.getTime()<this.$props.min.getTime()||!1,valid:d,valueMissing:this.computedValue===null}},getDateInputText(){return this.computedValue?!0:this._dateInput?this._dateInput._element.value:""},focus(){const e=this.dateInputElement();e&&e.focus()},setShow(e){this.computedShow!==e&&(this.currentShow=e,this.$emit(e?"open":"close",{component:this}))},handleReject(){this.setShow(!1)},handleValueChange(e){this.currentValue=r.cloneDate(e.value||void 0),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0,this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:e.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,valueAsDate:this.computedValue}}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},handleFocus(e){this.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.createBlurTimeout(),this.$emit("blur",{event:e})},timeSelectorBlur(e){this.$emit("blur",{event:e}),clearTimeout(this._blurTimeout),this.createBlurTimeout()},timeSelectorFocus(){clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout(()=>{this.isFocused=!1;const e=document.activeElement&&document.activeElement.closest(`#${this._popupId}`);this._dateInput&&t.canUseDOM&&document.activeElement!==this._dateInput.element()&&!e&&this.setShow(!1)},200)},handleDateIconClick(e){this.$props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.computedShow),this.$emit("iconclick",e))},handleIconMouseDown(e){e.preventDefault()},handleKeyDown(e){const{altKey:i,keyCode:a}=e;if(a===t.Keys.tab&&this._dateInput&&e.target!==this._dateInput._element){e.preventDefault(),this.$data.shouldFocusDateInput=!0,this.setShow(!1);return}if(a===t.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}i&&(a===t.Keys.up||a===t.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=a===t.Keys.up,this.setShow(a===t.Keys.down)),this.$emit("keydown",e)},dateInputElement(){return this._dateInput&&this._dateInput.$el||this._wrapper&&this._wrapper.querySelector(".k-dateinput-wrap > input.k-input")}}});exports.DateTimePicker=ne;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),G=require("@progress/kendo-vue-labels"),J=require("@progress/kendo-vue-buttons"),Q=require("@progress/kendo-vue-popup"),r=require("@progress/kendo-date-math"),t=require("@progress/kendo-vue-common"),W=require("../dateinput/DateInput.js"),Y=require("../package-metadata.js"),u=require("../utils.js"),o=require("../messages/main.js"),b=require("@progress/kendo-vue-intl"),Z=require("./DateTimeSelector.js"),ee=require("../timepicker/utils.js"),T=require("../defaults.js"),te=require("../dateinput/utils.js"),ie=require("@progress/kendo-svg-icons");function m(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!n.isVNode(e)}const ne=n.defineComponent({name:"KendoDateTimePicker",emits:{changemodel:e=>!0,"update:modelValue":e=>!0,iconclick:e=>!0,change:e=>!0,focus:e=>!0,blur:e=>!0,keydown:e=>!0,open:e=>!0,close:e=>!0},props:{modelValue:{type:Date,default:void 0},defaultShow:{type:Boolean,default:!1},defaultValue:{type:Date,default:null},disabled:{type:Boolean,default:!1},dateInput:{type:[String,Object,Function],default:function(){}},popup:{type:[String,Object,Function],default:function(){}},calendar:{type:[String,Object,Function],default:function(){}},focusedDate:Date,format:{type:[String,Object],default:function(){return"g"}},formatPlaceholder:{type:[String,Object],default:function(){return te.defaultFormatPlaceholder}},rounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},fillMode:{type:String,validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,validator:function(e){return["none","small","medium","large"].includes(e)}},id:String,ariaLabelledBy:String,ariaDescribedBy:String,min:{type:Date,default:function(){return u.MIN_DATE}},max:{type:Date,default:function(){return u.MAX_DATE}},maxTime:{type:Date,default:function(){return r.cloneDate(u.MAX_TIME)}},minTime:{type:Date,default:function(){return r.cloneDate(T.MIN_TIME)}},name:String,label:String,placeholder:String,popupSettings:{type:Object,default:function(){return{}}},show:{type:Boolean,default:void 0},tabIndex:{type:Number,default:0},title:{type:String,default:function(){return""}},steps:{type:Object,default:function(){return{}}},value:Date,weekNumber:{type:Boolean,default:!1},width:String,validationMessage:String,required:{type:Boolean,default:!1},validityStyles:{type:Boolean,default:!0},validate:Boolean,valid:{type:Boolean,default:void 0},cancelButton:{type:Boolean,default:!0},inputAttributes:Object},model:{event:"changemodel"},created(){this._anchor=t.guid(),this._popupId="popup"+t.guid(),this._wrapper=null,this._dateInput=null,this._dateTimeSelector=null,t.validatePackage(Y.packageMetadata),this.currentValue=this.$props.defaultValue,this.currentShow=this.$props.defaultShow},inject:{kendoLocalizationService:{default:null}},data(){return{currentValue:null,currentShow:!1,valueDuringOnChange:void 0,showDuringOnChange:void 0,shouldFocusDateInput:!1,isFocused:!1}},computed:{computedValue(){const e=this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.$props.value!==void 0?this.$props.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.$data.currentValue;return e!==null?r.cloneDate(e):null},computedShow(){return this.showDuringOnChange!==void 0?this.showDuringOnChange:this.$props.show!==void 0?this.$props.show:this.currentShow}},watch:{show:function(e,i){this._oldShow=i},currentShow:function(e,i){this._oldShow=i}},mounted(){this.computedShow&&this.$forceUpdate();const e=this.dateInputElement();this._dateTimeSelector=this.$refs.dateTimeSelector,this._wrapper=this.kendoAnchorRef,this._dateInput=this.dateInputRef,e&&e.setAttribute("aria-haspopup","true")},updated(){const e=this.dateInputElement();this._dateTimeSelector=this.$refs.dateTimeSelector,this._wrapper=this.kendoAnchorRef,this._dateTimeSelector&&this.computedShow&&!this._oldShow&&this._dateTimeSelector.focus({preventScroll:!0}),e&&!this.computedShow&&this.shouldFocusDateInput&&this._dateInput.focus({preventScroll:!0}),this.shouldFocusDateInput=!1},setup(){const e=n.ref(null),i=n.inject("kendoLocalizationService",{});return{kendoAnchorRef:e,kendoLocalizationService:i}},render(){const e=t.getDefaultSlots(this),{disabled:i,tabIndex:a,title:d,id:f,format:g,formatPlaceholder:$,min:k,max:V,weekNumber:_,focusedDate:M,width:S,name:B,steps:v,placeholder:C,validationMessage:q,required:F,validityStyles:O,cancelButton:R,minTime:D,maxTime:w,ariaLabelledBy:ae,ariaDescribedBy:oe,size:p,fillMode:I,rounded:c,inputAttributes:x}=this.$props,{popupClass:E,appendTo:A,animate:j}=this.$props.popupSettings,y=!this.$props.validityStyles||this.validity().valid,N=this.$props.dateInput?t.templateRendering.call(this,this.$props.dateInput,t.getListeners.call(this)):void 0,P=n.createVNode(W.DateInput,{ref:h=>{this.dateInputRef=h},placeholder:C,disabled:i,format:g,formatPlaceholder:$,id:f,max:V,min:k,minTime:D,maxTime:w,name:B,size:null,rounded:null,fillMode:null,onChange:this.handleValueChange,required:F,steps:v,tabIndex:this.computedShow?-1:a,title:d,valid:this.validity().valid,validationMessage:q,validityStyles:O,value:this.computedValue,ariaHasPopup:"dialog",ariaExpanded:this.computedShow,ariaRole:"combobox",ariaControls:this._popupId,inputAttributes:x},m(e)?e:{default:()=>[e]}),L=t.getTemplate.call(this,{h:n.h,template:N,defaultRendering:P}),K=this.$props.calendar?t.templateRendering.call(this,this.$props.calendar,t.getListeners.call(this)):void 0,s=n.createVNode(Z.DateTimeSelector,{ref:"dateTimeSelector",cancelButton:R,value:this.computedValue,onChange:this.handleValueChange,onReject:this.handleReject,disabled:i,weekNumber:_,min:this.$props.min,max:this.$props.max,minTime:D,maxTime:w,focusedDate:M,format:g,calendar:K,steps:v,onFocus:this.timeSelectorFocus,onBlur:this.timeSelectorBlur,onKeydown:this.handleKeyDown},null),z=t.classNames("k-datetime-container k-reset",E),U=this.$props.popup?t.templateRendering.call(this,this.$props.popup,t.getListeners.call(this)):void 0,X=n.createVNode(Q.Popup,{show:this.computedShow,anchor:this._anchor,popupClass:z,id:this._popupId,anchorAlign:{horizontal:"left",vertical:"bottom"},popupAlign:{horizontal:"left",vertical:"top"},appendTo:A,animate:j},m(s)?s:{default:()=>[s]}),H=t.getTemplate.call(this,{h:n.h,template:U,defaultRendering:X,defaultSlots:s}),l=n.createVNode("div",{class:t.classNames("k-input","k-datetimepicker",{[`k-input-${t.kendoThemeMaps.sizeMap[p]||p}`]:p,[`k-input-${I}`]:I,[`k-rounded-${t.kendoThemeMaps.roundedMap[c]||c}`]:c,"k-invalid":!y,"k-required":this.required,"k-disabled":this.$props.disabled}),ref:h=>{this.kendoAnchorRef=h},onKeydown:this.handleKeyDown,style:{width:S},onFocusin:this.handleFocus,onFocusout:this.handleBlur},[L,n.createVNode(J.Button,{type:"button",tabIndex:-1,icon:"calendar",svgIcon:ie.calendarIcon,onMousedown:this.handleIconMouseDown,onClick:this.handleDateIconClick,title:b.provideLocalizationService(this).toLanguageString(o.toggleDateTimeSelector,o.messages[o.toggleDateTimeSelector]),rounded:null,disabled:i,class:"k-input-button","aria-controls":this._popupId,"aria-label":b.provideLocalizationService(this).toLanguageString(o.toggleDateTimeSelector,o.messages[o.toggleDateTimeSelector])},null),H]);return this.$props.label?n.createVNode(G.FloatingLabel,{label:this.$props.label,editorId:f,editorValid:y,editorValue:this.getDateInputText(),editorPlaceholder:this.$props.placeholder,editorDisabled:this.$props.disabled,style:{width:S}},m(l)?l:{default:()=>[l]}):l},methods:{validity(){const e=u.isInDateRange(this.computedValue,this.$props.min,this.$props.max)&&ee.isInTimeRange(this.computedValue,this.$props.minTime||T.MIN_TIME,this.$props.maxTime||u.MAX_TIME),i=this.$props.validationMessage!==void 0,a=(!this.$props.required||this.computedValue!==null)&&e,d=this.$props.valid!==void 0?this.$props.valid:a;return{customError:i,rangeOverflow:this.computedValue&&this.$props.max.getTime()<this.computedValue.getTime()||!1,rangeUnderflow:this.computedValue&&this.computedValue.getTime()<this.$props.min.getTime()||!1,valid:d,valueMissing:this.computedValue===null}},getDateInputText(){return this.computedValue?!0:this._dateInput?this._dateInput._element.value:""},focus(){const e=this.dateInputElement();e&&e.focus()},setShow(e){this.computedShow!==e&&(this.currentShow=e,this.$emit(e?"open":"close",{component:this}))},handleReject(){this.setShow(!1)},handleValueChange(e){this.currentValue=r.cloneDate(e.value||void 0),this.valueDuringOnChange=e.value,this.showDuringOnChange=!1,this.shouldFocusDateInput=!0,this.$emit("changemodel",this.computedValue),this.$emit("update:modelValue",this.computedValue),this.$emit("change",{event:e.event,value:this.computedValue,show:this.computedShow,component:this,target:{name:this.$props.name,value:this.computedValue,valueAsDate:this.computedValue}}),this.valueDuringOnChange=void 0,this.showDuringOnChange=void 0,this.setShow(!1)},handleFocus(e){this.isFocused=!0,this.$emit("focus",{event:e})},handleBlur(e){this.createBlurTimeout(),this.$emit("blur",{event:e})},timeSelectorBlur(e){this.$emit("blur",{event:e}),clearTimeout(this._blurTimeout),this.createBlurTimeout()},timeSelectorFocus(){clearTimeout(this._blurTimeout)},createBlurTimeout(){this._blurTimeout=setTimeout(()=>{this.isFocused=!1;const e=document.activeElement&&document.activeElement.closest(`#${this._popupId}`);this._dateInput&&t.canUseDOM&&document.activeElement!==this._dateInput.element()&&!e&&this.setShow(!1)},200)},handleDateIconClick(e){this.$props.disabled||(this.shouldFocusDateInput=!0,this.setShow(!this.computedShow),this.$emit("iconclick",e))},handleIconMouseDown(e){e.preventDefault()},handleKeyDown(e){const{altKey:i,keyCode:a}=e;if(a===t.Keys.tab&&this._dateInput&&e.target!==this._dateInput._element){e.preventDefault(),this.$data.shouldFocusDateInput=!0,this.setShow(!1);return}if(a===t.Keys.esc){this.shouldFocusDateInput=!0,this.setShow(!1);return}i&&(a===t.Keys.up||a===t.Keys.down)&&(e.preventDefault(),e.stopPropagation(),this.shouldFocusDateInput=a===t.Keys.up,this.setShow(a===t.Keys.down)),this.$emit("keydown",e)},dateInputElement(){return this._dateInput&&this._dateInput.$el||this._wrapper&&this._wrapper.querySelector(".k-dateinput-wrap > input.k-input")}}});exports.DateTimePicker=ne;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as ie, createVNode as n, h as
|
|
8
|
+
import { defineComponent as ie, createVNode as n, h as $, ref as ne, inject as ae, isVNode as oe } from "vue";
|
|
9
9
|
import { FloatingLabel as ue } from "@progress/kendo-vue-labels";
|
|
10
10
|
import { Button as se } from "@progress/kendo-vue-buttons";
|
|
11
11
|
import { Popup as le } from "@progress/kendo-vue-popup";
|
|
12
12
|
import { cloneDate as s } from "@progress/kendo-date-math";
|
|
13
|
-
import { Keys as
|
|
13
|
+
import { Keys as a, canUseDOM as re, getDefaultSlots as de, templateRendering as c, getListeners as m, getTemplate as T, classNames as _, kendoThemeMaps as k, guid as V, validatePackage as pe } from "@progress/kendo-vue-common";
|
|
14
14
|
import { DateInput as he } from "../dateinput/DateInput.mjs";
|
|
15
15
|
import { packageMetadata as ce } from "../package-metadata.mjs";
|
|
16
16
|
import { isInDateRange as me, MAX_TIME as B, MAX_DATE as fe, MIN_DATE as ge } from "../utils.mjs";
|
|
@@ -22,7 +22,7 @@ import { MIN_TIME as M } from "../defaults.mjs";
|
|
|
22
22
|
import { defaultFormatPlaceholder as we } from "../dateinput/utils.mjs";
|
|
23
23
|
import { calendarIcon as Ie } from "@progress/kendo-svg-icons";
|
|
24
24
|
function f(e) {
|
|
25
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
25
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !oe(e);
|
|
26
26
|
}
|
|
27
27
|
const Pe = /* @__PURE__ */ ie({
|
|
28
28
|
name: "KendoDateTimePicker",
|
|
@@ -234,7 +234,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
234
234
|
}), this.shouldFocusDateInput = !1;
|
|
235
235
|
},
|
|
236
236
|
setup() {
|
|
237
|
-
const e = ne(null), t =
|
|
237
|
+
const e = ne(null), t = ae("kendoLocalizationService", {});
|
|
238
238
|
return {
|
|
239
239
|
kendoAnchorRef: e,
|
|
240
240
|
kendoLocalizationService: t
|
|
@@ -272,7 +272,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
272
272
|
popupClass: U,
|
|
273
273
|
appendTo: X,
|
|
274
274
|
animate: H
|
|
275
|
-
} = this.$props.popupSettings,
|
|
275
|
+
} = this.$props.popupSettings, b = !this.$props.validityStyles || this.validity().valid, G = this.$props.dateInput ? c.call(this, this.$props.dateInput, m.call(this)) : void 0, J = n(he, {
|
|
276
276
|
ref: (h) => {
|
|
277
277
|
this.dateInputRef = h;
|
|
278
278
|
},
|
|
@@ -306,10 +306,10 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
306
306
|
}, f(e) ? e : {
|
|
307
307
|
default: () => [e]
|
|
308
308
|
}), Q = T.call(this, {
|
|
309
|
-
h:
|
|
309
|
+
h: $,
|
|
310
310
|
template: G,
|
|
311
311
|
defaultRendering: J
|
|
312
|
-
}), W = this.$props.calendar ? c.call(this, this.$props.calendar, m.call(this)) : void 0,
|
|
312
|
+
}), W = this.$props.calendar ? c.call(this, this.$props.calendar, m.call(this)) : void 0, o = n(Se, {
|
|
313
313
|
ref: "dateTimeSelector",
|
|
314
314
|
cancelButton: K,
|
|
315
315
|
value: this.computedValue,
|
|
@@ -343,19 +343,19 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
343
343
|
},
|
|
344
344
|
appendTo: X,
|
|
345
345
|
animate: H
|
|
346
|
-
}, f(
|
|
347
|
-
default: () => [
|
|
346
|
+
}, f(o) ? o : {
|
|
347
|
+
default: () => [o]
|
|
348
348
|
}), te = T.call(this, {
|
|
349
|
-
h:
|
|
349
|
+
h: $,
|
|
350
350
|
template: Z,
|
|
351
351
|
defaultRendering: ee,
|
|
352
|
-
defaultSlots:
|
|
352
|
+
defaultSlots: o
|
|
353
353
|
}), u = n("div", {
|
|
354
354
|
class: _("k-input", "k-datetimepicker", {
|
|
355
355
|
[`k-input-${k.sizeMap[d] || d}`]: d,
|
|
356
356
|
[`k-input-${y}`]: y,
|
|
357
357
|
[`k-rounded-${k.roundedMap[p] || p}`]: p,
|
|
358
|
-
"k-invalid":
|
|
358
|
+
"k-invalid": !b,
|
|
359
359
|
"k-required": this.required,
|
|
360
360
|
"k-disabled": this.$props.disabled
|
|
361
361
|
}),
|
|
@@ -377,6 +377,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
377
377
|
onClick: this.handleDateIconClick,
|
|
378
378
|
title: F(this).toLanguageString(l, C[l]),
|
|
379
379
|
rounded: null,
|
|
380
|
+
disabled: t,
|
|
380
381
|
class: "k-input-button",
|
|
381
382
|
"aria-controls": this._popupId,
|
|
382
383
|
"aria-label": F(this).toLanguageString(l, C[l])
|
|
@@ -384,7 +385,7 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
384
385
|
return this.$props.label ? n(ue, {
|
|
385
386
|
label: this.$props.label,
|
|
386
387
|
editorId: g,
|
|
387
|
-
editorValid:
|
|
388
|
+
editorValid: b,
|
|
388
389
|
editorValue: this.getDateInputText(),
|
|
389
390
|
editorPlaceholder: this.$props.placeholder,
|
|
390
391
|
editorDisabled: this.$props.disabled,
|
|
@@ -470,15 +471,15 @@ const Pe = /* @__PURE__ */ ie({
|
|
|
470
471
|
altKey: t,
|
|
471
472
|
keyCode: i
|
|
472
473
|
} = e;
|
|
473
|
-
if (i ===
|
|
474
|
+
if (i === a.tab && this._dateInput && e.target !== this._dateInput._element) {
|
|
474
475
|
e.preventDefault(), this.$data.shouldFocusDateInput = !0, this.setShow(!1);
|
|
475
476
|
return;
|
|
476
477
|
}
|
|
477
|
-
if (i ===
|
|
478
|
+
if (i === a.esc) {
|
|
478
479
|
this.shouldFocusDateInput = !0, this.setShow(!1);
|
|
479
480
|
return;
|
|
480
481
|
}
|
|
481
|
-
t && (i ===
|
|
482
|
+
t && (i === a.up || i === a.down) && (e.preventDefault(), e.stopPropagation(), this.shouldFocusDateInput = i === a.up, this.setShow(i === a.down)), this.$emit("keydown", e);
|
|
482
483
|
},
|
|
483
484
|
dateInputElement() {
|
|
484
485
|
return this._dateInput && this._dateInput.$el || this._wrapper && this._wrapper.querySelector(".k-dateinput-wrap > input.k-input");
|