@progress/kendo-vue-dateinputs 2.5.0-dev.202109140519 → 2.5.1-dev.202110051346

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 (58) hide show
  1. package/dist/cdn/js/kendo-vue-dateinputs.js +1 -1
  2. package/dist/es/calendar/components/CalendarCell.d.ts +1 -0
  3. package/dist/es/calendar/components/CalendarHeaderTitle.d.ts +1 -0
  4. package/dist/es/calendar/components/Header.d.ts +2 -0
  5. package/dist/es/calendar/components/View.d.ts +2 -0
  6. package/dist/es/calendar/components/ViewList.d.ts +2 -0
  7. package/dist/es/calendar/components/ViewList.js +1 -1
  8. package/dist/es/calendar/components/interfaces/CalendarComputed.d.ts +1 -0
  9. package/dist/es/calendar/components/interfaces/CalendarMethods.d.ts +1 -0
  10. package/dist/es/dateinput/DateInput.js +31 -25
  11. package/dist/es/dateinput/interfaces/DateInputComputed.d.ts +2 -1
  12. package/dist/es/dateinput/interfaces/DateInputData.d.ts +1 -0
  13. package/dist/es/dateinput/interfaces/DateInputMethods.d.ts +1 -0
  14. package/dist/es/datepicker/DatePicker.js +29 -4
  15. package/dist/es/datepicker/interfaces/DatePickerComputed.d.ts +1 -0
  16. package/dist/es/datepicker/interfaces/DatePickerMethods.d.ts +2 -0
  17. package/dist/es/datepicker/interfaces/DatePickerProps.d.ts +4 -0
  18. package/dist/es/datetimepicker/DateTimePicker.d.ts +5 -0
  19. package/dist/es/datetimepicker/DateTimePicker.js +38 -11
  20. package/dist/es/datetimepicker/DateTimeSelector.d.ts +2 -0
  21. package/dist/es/datetimepicker/models/DateTimePickerSettings.d.ts +9 -0
  22. package/dist/es/package-metadata.js +1 -1
  23. package/dist/es/timepicker/TimeList.d.ts +2 -0
  24. package/dist/es/timepicker/TimePart.d.ts +2 -0
  25. package/dist/es/timepicker/TimePicker.d.ts +5 -0
  26. package/dist/es/timepicker/TimePicker.js +44 -15
  27. package/dist/es/timepicker/TimeSelector.d.ts +2 -0
  28. package/dist/es/timepicker/models/TimePickerSettings.d.ts +8 -0
  29. package/dist/es/virtualization/Virtualization.d.ts +2 -0
  30. package/dist/npm/calendar/components/CalendarCell.d.ts +1 -0
  31. package/dist/npm/calendar/components/CalendarHeaderTitle.d.ts +1 -0
  32. package/dist/npm/calendar/components/Header.d.ts +2 -0
  33. package/dist/npm/calendar/components/View.d.ts +2 -0
  34. package/dist/npm/calendar/components/ViewList.d.ts +2 -0
  35. package/dist/npm/calendar/components/ViewList.js +1 -1
  36. package/dist/npm/calendar/components/interfaces/CalendarComputed.d.ts +1 -0
  37. package/dist/npm/calendar/components/interfaces/CalendarMethods.d.ts +1 -0
  38. package/dist/npm/dateinput/DateInput.js +31 -24
  39. package/dist/npm/dateinput/interfaces/DateInputComputed.d.ts +2 -1
  40. package/dist/npm/dateinput/interfaces/DateInputData.d.ts +1 -0
  41. package/dist/npm/dateinput/interfaces/DateInputMethods.d.ts +1 -0
  42. package/dist/npm/datepicker/DatePicker.js +30 -4
  43. package/dist/npm/datepicker/interfaces/DatePickerComputed.d.ts +1 -0
  44. package/dist/npm/datepicker/interfaces/DatePickerMethods.d.ts +2 -0
  45. package/dist/npm/datepicker/interfaces/DatePickerProps.d.ts +4 -0
  46. package/dist/npm/datetimepicker/DateTimePicker.d.ts +5 -0
  47. package/dist/npm/datetimepicker/DateTimePicker.js +39 -11
  48. package/dist/npm/datetimepicker/DateTimeSelector.d.ts +2 -0
  49. package/dist/npm/datetimepicker/models/DateTimePickerSettings.d.ts +9 -0
  50. package/dist/npm/package-metadata.js +1 -1
  51. package/dist/npm/timepicker/TimeList.d.ts +2 -0
  52. package/dist/npm/timepicker/TimePart.d.ts +2 -0
  53. package/dist/npm/timepicker/TimePicker.d.ts +5 -0
  54. package/dist/npm/timepicker/TimePicker.js +45 -15
  55. package/dist/npm/timepicker/TimeSelector.d.ts +2 -0
  56. package/dist/npm/timepicker/models/TimePickerSettings.d.ts +8 -0
  57. package/dist/npm/virtualization/Virtualization.d.ts +2 -0
  58. package/package.json +7 -6
@@ -15,6 +15,7 @@ export interface CalendarCellProps extends CellContext {
15
15
  * @hidden
16
16
  */
17
17
  export interface CalendarCellMethods {
18
+ [key: string]: any;
18
19
  handleClick?: (e: any) => void;
19
20
  handleMouseDown?: (e: any) => void;
20
21
  handleMouseEnter?: () => void;
@@ -15,6 +15,7 @@ export interface CalendarHeaderTitleProps {
15
15
  * @hidden
16
16
  */
17
17
  export interface CalendarHeaderTitleMethods {
18
+ [key: string]: any;
18
19
  handleClick: (e: any) => void;
19
20
  }
20
21
  /**
@@ -33,6 +33,7 @@ export interface HeaderProps {
33
33
  * @hidden
34
34
  */
35
35
  export interface HeaderMethods {
36
+ [key: string]: any;
36
37
  getTitle: () => string;
37
38
  handleTitleClick: (event: any) => void;
38
39
  handleTodayClick: (event: any) => void;
@@ -47,6 +48,7 @@ export interface HeaderMethods {
47
48
  * @hidden
48
49
  */
49
50
  export interface HeaderComputed {
51
+ [key: string]: any;
50
52
  navigate?: () => void;
51
53
  todayIsInRange?: () => boolean;
52
54
  }
@@ -61,6 +61,7 @@ export interface ViewProps {
61
61
  * @hidden
62
62
  */
63
63
  export interface ViewComputed {
64
+ [key: string]: any;
64
65
  isMonthView?: boolean;
65
66
  weekNumber?: boolean;
66
67
  isHorizontal?: boolean;
@@ -69,6 +70,7 @@ export interface ViewComputed {
69
70
  * @hidden
70
71
  */
71
72
  export interface ViewMethods {
73
+ [key: string]: any;
72
74
  buildWeekNumber: (row: any, idx: number) => void;
73
75
  buildRow: (row: any) => void;
74
76
  firstDate: (row: any) => any;
@@ -69,6 +69,7 @@ export interface ViewListState {
69
69
  * @hidden
70
70
  */
71
71
  export interface ViewListComputed {
72
+ [key: string]: any;
72
73
  weekNames?: string[];
73
74
  weekNumber?: boolean;
74
75
  animate?: boolean;
@@ -77,6 +78,7 @@ export interface ViewListComputed {
77
78
  * @hidden
78
79
  */
79
80
  export interface ViewListMethods {
81
+ [key: string]: any;
80
82
  blurActiveDate: () => void;
81
83
  focusActiveDate: (event: any) => void;
82
84
  handleCellEnter: (event: any) => void;
@@ -227,7 +227,7 @@ var ViewList = {
227
227
  render: function render(createElement) {
228
228
  var h = gh || createElement;
229
229
  var selectionRange = this.$props.allowReverse ? this.rotateSelectionRange(this.$props.selectionRange) : this.$props.selectionRange;
230
- var rootClassNames = classNames('k-calendar-view', 'k-hstck k-align-items-start k-justify-content-center', {
230
+ var rootClassNames = classNames('k-calendar-view', 'k-hstack k-align-items-start k-justify-content-center', {
231
231
  'k-calendar-monthview': this.$props.activeView === CalendarViewEnum.month,
232
232
  'k-calendar-yearview': this.$props.activeView === CalendarViewEnum.year,
233
233
  'k-calendar-decadeview': this.$props.activeView === CalendarViewEnum.decade,
@@ -3,6 +3,7 @@ import { SelectionRangeEnd } from '../../models';
3
3
  * @hidden
4
4
  */
5
5
  export interface CalendarComputed {
6
+ [key: string]: any;
6
7
  activeRange?: SelectionRangeEnd;
7
8
  currentMin: Date;
8
9
  currentMax: Date;
@@ -4,6 +4,7 @@ import { ViewListEventArguments } from '../ViewList';
4
4
  * @hidden
5
5
  */
6
6
  export interface CalendarMethods {
7
+ [key: string]: any;
7
8
  computedValue: () => Date | Date[] | SelectionRange | null;
8
9
  focus: (event?: any) => void;
9
10
  handleTodayClick: (e: any) => void;
@@ -23,11 +23,12 @@ import { provideIntlService, provideLocalizationService } from '@progress/kendo-
23
23
  import { KendoDate } from './models';
24
24
  import { guid, noop, validatePackage, canUseDOM } from '@progress/kendo-vue-common';
25
25
  import { packageMetadata } from '../package-metadata';
26
- import { approximateStringMatching, defaultFormat, defaultFormatPlaceholder, isInRange, invalidClasses, wrapperClasses } from './utils';
26
+ import { approximateStringMatching, defaultFormat, defaultFormatPlaceholder, isInRange, wrapperClasses } from './utils';
27
27
  import { MAX_DATE, MIN_DATE } from './../utils';
28
28
  import { messages, increaseValue, decreaseValue } from './../messages';
29
29
  import { isInTimeRange } from '../timepicker/utils';
30
30
  import { MIN_TIME, MAX_TIME } from '../defaults';
31
+ import { FloatingLabel } from '@progress/kendo-vue-labels';
31
32
  var VALIDATION_MESSAGE = 'Please enter a valid value!';
32
33
  var DateInput = {
33
34
  name: 'DateInput',
@@ -130,9 +131,9 @@ var DateInput = {
130
131
  currentFormat: undefined,
131
132
  valueDuringOnChange: undefined,
132
133
  hasMounted: false,
133
- focused: false,
134
134
  isEmpty: undefined,
135
- lastSelectedSymbol: undefined
135
+ lastSelectedSymbol: undefined,
136
+ isFocused: false
136
137
  };
137
138
  },
138
139
  created: function created() {
@@ -159,14 +160,15 @@ var DateInput = {
159
160
  return this.kendoDate && this.kendoDate.getDateObject();
160
161
  }
161
162
  },
162
- spanClassNames: {
163
+ wrapperClassNames: {
163
164
  get: function get() {
164
165
  var isValid = !this.$data.hasMounted || !this.$props.validityStyles || this.validity().valid;
166
+ var disabled = this.$props.disabled;
165
167
  return {
166
- 'k-floating-label-container': true,
167
- 'k-state-focused': this.$data.focused,
168
- 'k-state-empty': this.$data.isEmpty && this.$props.placeholder === '',
168
+ 'k-dateinput-wrap': true,
169
+ 'k-state-disabled': disabled,
169
170
  'k-state-invalid': !isValid && isValid !== undefined,
171
+ 'k-state-focused': this.isFocused,
170
172
  'k-rtl': this.$props.dir === 'rtl'
171
173
  };
172
174
  }
@@ -198,11 +200,11 @@ var DateInput = {
198
200
  }
199
201
  },
200
202
  handleFocus: function handleFocus(e) {
201
- this.$data.focused = true;
203
+ this.$data.isFocused = true;
202
204
  this.$emit('focus', e);
203
205
  },
204
206
  handleBlur: function handleBlur(e) {
205
- this.$data.focused = false;
207
+ this.$data.isFocused = false;
206
208
  this.$emit('blur', e);
207
209
  },
208
210
  intl: function intl() {
@@ -542,7 +544,7 @@ var DateInput = {
542
544
 
543
545
  this.$data.currentFormat = currentFormat;
544
546
  this.$data.isEmpty = currentText === this._emptyText;
545
- var showPlaceHolder = this.$props.placeholder !== undefined && this.$data.isEmpty && !this.$data.focused;
547
+ var showPlaceHolder = this.$props.placeholder !== undefined && this.$data.isEmpty && !this.$data.isFocused;
546
548
  var textToDisplay = !showPlaceHolder ? currentText : null;
547
549
  var inputId = id || this._inputId;
548
550
  var isValid = !this.$props.validityStyles || this.validity().valid;
@@ -558,9 +560,9 @@ var DateInput = {
558
560
  attrs: this.v3 ? undefined : {
559
561
  dir: this.$props.dir
560
562
  },
561
- "class": isValid ? wrapperClassesInstance.join(' ') : Array.prototype.concat([], wrapperClassesInstance, invalidClasses).join(' ')
563
+ "class": wrapperClassesInstance.join(' ')
562
564
  }, [h("span", {
563
- "class": 'k-dateinput-wrap' + (this.$props.disabled ? ' k-state-disabled' : '')
565
+ "class": this.wrapperClassNames
564
566
  }, [h("input", {
565
567
  role: "spinbutton",
566
568
  attrs: this.v3 ? undefined : {
@@ -653,21 +655,25 @@ var DateInput = {
653
655
  }, [h("span", {
654
656
  "class": "k-icon k-i-arrow-s"
655
657
  })])])])]);
656
- return label ? h("span", {
657
- "class": this.spanClassNames,
658
- dir: this.$props.dir,
659
- attrs: this.v3 ? undefined : {
660
- dir: this.$props.dir
661
- }
662
- }, [dateinput, this.$props.label ? inputId ? h("label", {
663
- "for": inputId,
658
+ return label ? // @ts-ignore function children
659
+ h(FloatingLabel, {
660
+ label: label,
664
661
  attrs: this.v3 ? undefined : {
665
- "for": inputId
662
+ label: label,
663
+ editorId: inputId,
664
+ editorValue: textToDisplay,
665
+ editorPlaceholder: this.$props.placeholder,
666
+ editorValid: isValid,
667
+ editorDisabled: this.$props.disabled
666
668
  },
667
- "class": "k-label"
668
- }, [this.$props.label]) : h("span", {
669
- "class": "k-label"
670
- }, [this.$props.label]) : null]) : dateinput;
669
+ editorId: inputId,
670
+ editorValue: textToDisplay,
671
+ editorPlaceholder: this.$props.placeholder,
672
+ editorValid: isValid,
673
+ editorDisabled: this.$props.disabled
674
+ }, this.v3 ? function () {
675
+ return [dateinput];
676
+ } : [dateinput]) : dateinput;
671
677
  }
672
678
  };
673
679
  var DateInputVue3 = DateInput;
@@ -2,6 +2,7 @@
2
2
  * @hidden
3
3
  */
4
4
  export interface DateInputComputed {
5
+ [key: string]: any;
5
6
  computedValue: any;
6
- spanClassNames: any;
7
+ wrapperClassNames: object;
7
8
  }
@@ -7,4 +7,5 @@ export interface DateInputData {
7
7
  currentFormat: string;
8
8
  valueDuringOnChange: Date | null | undefined;
9
9
  lastSelectedSymbol: string;
10
+ isFocused: boolean;
10
11
  }
@@ -5,6 +5,7 @@ import { Selection } from '../models';
5
5
  * @hidden
6
6
  */
7
7
  export interface DateInputMethods {
8
+ [key: string]: any;
8
9
  handleFocus?: (_: any) => void;
9
10
  handleBlur?: (_: any) => void;
10
11
  element: () => HTMLInputElement | null;
@@ -15,7 +15,8 @@ import { isInDateRange } from '../utils';
15
15
  import { messages, toggleCalendar } from '../messages';
16
16
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
17
17
  import { ToggleButton } from './ToggleButton';
18
- import { PickerWrap } from '../common/PickerWrap'; // tslint:enable:max-line-length
18
+ import { PickerWrap } from '../common/PickerWrap';
19
+ import { FloatingLabel } from '@progress/kendo-vue-labels'; // tslint:enable:max-line-length
19
20
 
20
21
  var DatePicker = {
21
22
  name: 'DatePicker',
@@ -70,6 +71,7 @@ var DatePicker = {
70
71
  return undefined;
71
72
  }
72
73
  },
74
+ label: String,
73
75
  placeholder: String,
74
76
  popup: {
75
77
  type: [String, Object, Function],
@@ -316,6 +318,9 @@ var DatePicker = {
316
318
  var value = this.mergeTime(event.value);
317
319
  this.handleValueChange(value, event);
318
320
  },
321
+ getDateInputText: function getDateInputText() {
322
+ return this._dateInput ? this._dateInput._element.value : '';
323
+ },
319
324
  handleValueChange: function handleValueChange(value, event) {
320
325
  this.$data.currentValue = cloneDate(value || undefined);
321
326
  this.$data.currentShow = false;
@@ -467,7 +472,6 @@ var DatePicker = {
467
472
  placeholder: this.$props.placeholder,
468
473
  attrs: this.v3 ? undefined : {
469
474
  placeholder: this.$props.placeholder,
470
- label: this.$props.label,
471
475
  disabled: disabled,
472
476
  format: format,
473
477
  formatPlaceholder: formatPlaceholder,
@@ -483,7 +487,6 @@ var DatePicker = {
483
487
  validityStyles: validityStyles,
484
488
  value: value
485
489
  },
486
- label: this.$props.label,
487
490
  disabled: disabled,
488
491
  format: format,
489
492
  formatPlaceholder: formatPlaceholder,
@@ -601,7 +604,7 @@ var DatePicker = {
601
604
  defaultRendering: popupDefaultRendering,
602
605
  defaultSlots: calendarRendering
603
606
  });
604
- return h("span", {
607
+ var datepicker = h("span", {
605
608
  ref: this.v3 ? function (el) {
606
609
  _this.kendoAnchorRef = el;
607
610
  } : this._anchor,
@@ -621,6 +624,28 @@ var DatePicker = {
621
624
  onFocusin: this.handleFocus,
622
625
  onFocusout: this.handleBlur
623
626
  }, [pickerWrapRendering, popupRendering]);
627
+ return this.$props.label ? // @ts-ignore function children
628
+ h(FloatingLabel, {
629
+ label: this.$props.label,
630
+ attrs: this.v3 ? undefined : {
631
+ label: this.$props.label,
632
+ editorId: id,
633
+ editorValid: isValid,
634
+ editorValue: this.getDateInputText(),
635
+ editorPlaceholder: this.$props.placeholder,
636
+ editorDisabled: this.$props.disabled
637
+ },
638
+ editorId: id,
639
+ editorValid: isValid,
640
+ editorValue: this.getDateInputText(),
641
+ editorPlaceholder: this.$props.placeholder,
642
+ editorDisabled: this.$props.disabled,
643
+ style: {
644
+ width: width
645
+ }
646
+ }, this.v3 ? function () {
647
+ return [datepicker];
648
+ } : [datepicker]) : datepicker;
624
649
  }
625
650
  };
626
651
  var DatePickerVue3 = DatePicker;
@@ -2,6 +2,7 @@
2
2
  * @hidden
3
3
  */
4
4
  export interface DatePickerComputed {
5
+ [key: string]: any;
5
6
  computedValue: Date | null;
6
7
  computedShow: boolean;
7
8
  wrapperClassNames: object;
@@ -5,6 +5,7 @@ import { DatePickerState } from './DatePickerState';
5
5
  * @hidden
6
6
  */
7
7
  export interface DatePickerMethods {
8
+ [key: string]: any;
8
9
  emitBlur?: (_: any) => void;
9
10
  validity: () => FormComponentValidity;
10
11
  nextValue: (nextProps: DatePickerProps, nextState: DatePickerState) => any;
@@ -18,6 +19,7 @@ export interface DatePickerMethods {
18
19
  handleBlur: (event: any) => void;
19
20
  calendarFocus: (event: any) => void;
20
21
  calendarBlur: (event: any) => void;
22
+ getDateInputText: () => string;
21
23
  createBlurTimeout: () => void;
22
24
  handleIconClick: () => void;
23
25
  handleIconMouseDown: (event: any) => void;
@@ -17,6 +17,10 @@ export interface DatePickerProps extends DatePickerSettings, FormComponentProps
17
17
  * Fires each time the user selects a new value ([see example]({% slug controlled_datepicker_native %}#toc-controlling-the-date-value)).
18
18
  */
19
19
  change?: (event: DatePickerChangeEvent) => void;
20
+ /**
21
+ * Renders a floating label for the DatePicker.
22
+ */
23
+ label?: string;
20
24
  /**
21
25
  * Specifies the value of the placeholder.
22
26
  */
@@ -51,6 +51,7 @@ export interface DateTimePickerData {
51
51
  valueDuringOnChange?: Date | null;
52
52
  showDuringOnChange?: boolean;
53
53
  shouldFocusDateInput: boolean;
54
+ isFocused: boolean;
54
55
  }
55
56
  /**
56
57
  * @hidden
@@ -59,6 +60,7 @@ export interface DateTimePickerState {
59
60
  _popupId: string;
60
61
  _wrapper: any;
61
62
  _dateInput: any;
63
+ dateInputRef: any;
62
64
  _dateTimeSelector: any;
63
65
  _anchor: any;
64
66
  _oldShow: boolean;
@@ -70,6 +72,7 @@ export interface DateTimePickerState {
70
72
  * @hidden
71
73
  */
72
74
  export interface DateTimePickerComputed {
75
+ [key: string]: any;
73
76
  computedValue: Date | null;
74
77
  computedShow: boolean;
75
78
  }
@@ -77,6 +80,7 @@ export interface DateTimePickerComputed {
77
80
  * @hidden
78
81
  */
79
82
  export interface DateTimePickerMethods {
83
+ [key: string]: any;
80
84
  validity: () => FormComponentValidity;
81
85
  focus: () => void;
82
86
  setShow: (show: boolean) => void;
@@ -91,6 +95,7 @@ export interface DateTimePickerMethods {
91
95
  timeSelectorBlur: (event: any) => void;
92
96
  timeSelectorFocus: () => void;
93
97
  createBlurTimeout: () => void;
98
+ getDateInputText: () => string;
94
99
  }
95
100
  /**
96
101
  * @hidden
@@ -4,6 +4,7 @@ var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var ref = allVue.ref;
6
6
  var inject = allVue.inject;
7
+ import { FloatingLabel } from '@progress/kendo-vue-labels';
7
8
  import { Popup } from '@progress/kendo-vue-popup';
8
9
  import { cloneDate } from '@progress/kendo-date-math';
9
10
  import { classNames, guid, Keys, templateRendering, getListeners, getTemplate, validatePackage, canUseDOM } from '@progress/kendo-vue-common';
@@ -95,6 +96,7 @@ var DateTimePicker = {
95
96
  }
96
97
  },
97
98
  name: String,
99
+ label: String,
98
100
  placeholder: String,
99
101
  popupSettings: {
100
102
  type: Object,
@@ -171,7 +173,8 @@ var DateTimePicker = {
171
173
  currentShow: false,
172
174
  valueDuringOnChange: undefined,
173
175
  showDuringOnChange: undefined,
174
- shouldFocusDateInput: false
176
+ shouldFocusDateInput: false,
177
+ isFocused: false
175
178
  };
176
179
  },
177
180
  computed: {
@@ -200,6 +203,7 @@ var DateTimePicker = {
200
203
  var dateInputElement = this.dateInputElement();
201
204
  this._dateTimeSelector = this.$refs.dateTimeSelector;
202
205
  this._wrapper = this.$refs[this._anchor];
206
+ this._dateInput = this.v3 ? this.dateInputRef : this.$refs.dateInput;
203
207
 
204
208
  if (dateInputElement) {
205
209
  dateInputElement.setAttribute('aria-haspopup', 'true');
@@ -278,12 +282,15 @@ var DateTimePicker = {
278
282
  });
279
283
  var wrapperClassNames = classNames('k-picker-wrap', {
280
284
  'k-state-default': !disabled,
281
- 'k-state-disabled': disabled
285
+ 'k-state-disabled': disabled,
286
+ 'k-state-focused': this.isFocused
282
287
  });
283
288
  var dateInput = this.$props.dateInput ? templateRendering.call(this, this.$props.dateInput, getListeners.call(this)) : undefined;
284
289
  var dateInputDefaultRendering = // @ts-ignore function children
285
290
  h(DateInput, {
286
- ref: 'dateInput',
291
+ ref: this.v3 ? function (el) {
292
+ _this.dateInputRef = el;
293
+ } : 'dateInput',
287
294
  placeholder: placeholder,
288
295
  attrs: this.v3 ? undefined : {
289
296
  placeholder: placeholder,
@@ -419,7 +426,7 @@ var DateTimePicker = {
419
426
  defaultRendering: popupDefaultRendering,
420
427
  defaultSlots: dataTimeSelector
421
428
  });
422
- return h("div", {
429
+ var dateTimePicker = h("div", {
423
430
  "class": rootClassName,
424
431
  onKeydown: this.handleKeyDown,
425
432
  on: this.v3 ? undefined : {
@@ -460,6 +467,28 @@ var DateTimePicker = {
460
467
  }, [h("span", {
461
468
  "class": "k-icon k-i-calendar"
462
469
  })])])]), popupRendering]);
470
+ return this.$props.label ? // @ts-ignore function children
471
+ h(FloatingLabel, {
472
+ label: this.$props.label,
473
+ attrs: this.v3 ? undefined : {
474
+ label: this.$props.label,
475
+ editorId: id,
476
+ editorValid: isValid,
477
+ editorValue: this.getDateInputText(),
478
+ editorPlaceholder: this.$props.placeholder,
479
+ editorDisabled: this.$props.disabled
480
+ },
481
+ editorId: id,
482
+ editorValid: isValid,
483
+ editorValue: this.getDateInputText(),
484
+ editorPlaceholder: this.$props.placeholder,
485
+ editorDisabled: this.$props.disabled,
486
+ style: {
487
+ width: width
488
+ }
489
+ }, this.v3 ? function () {
490
+ return [dateTimePicker];
491
+ } : [dateTimePicker]) : dateTimePicker;
463
492
  },
464
493
  methods: {
465
494
  validity: function validity() {
@@ -475,6 +504,9 @@ var DateTimePicker = {
475
504
  valueMissing: this.computedValue === null
476
505
  };
477
506
  },
507
+ getDateInputText: function getDateInputText() {
508
+ return this._dateInput ? this._dateInput._element.value : '';
509
+ },
478
510
  focus: function focus() {
479
511
  var dateInputElement = this.dateInputElement();
480
512
 
@@ -515,10 +547,7 @@ var DateTimePicker = {
515
547
  this.showDuringOnChange = undefined;
516
548
  },
517
549
  handleFocus: function handleFocus(event) {
518
- if (this._wrapper) {
519
- this._wrapper.classList.add('k-state-focused');
520
- }
521
-
550
+ this.isFocused = true;
522
551
  this.$emit('focus', event);
523
552
  },
524
553
  handleBlur: function handleBlur(event) {
@@ -537,9 +566,7 @@ var DateTimePicker = {
537
566
  var _this = this;
538
567
 
539
568
  this._blurTimeout = setTimeout(function () {
540
- if (_this._wrapper) {
541
- _this._wrapper.classList.remove('k-state-focused');
542
- }
569
+ _this.isFocused = false;
543
570
 
544
571
  if (_this._dateInput && canUseDOM && document.activeElement !== _this._dateInput.element() && document.activeElement && document.activeElement.className.indexOf('k-time-list') === -1) {
545
572
  _this.setShow(false);
@@ -63,6 +63,7 @@ export interface DateTimeSelectorState {
63
63
  * @hidden
64
64
  */
65
65
  export interface DateTimeSelectorComputed {
66
+ [key: string]: any;
66
67
  hasDateValue: boolean;
67
68
  computedMinTime: Date | null;
68
69
  computedMaxTime: Date | null;
@@ -71,6 +72,7 @@ export interface DateTimeSelectorComputed {
71
72
  * @hidden
72
73
  */
73
74
  export interface DateTimeSelectorMethods {
75
+ [key: string]: any;
74
76
  focus: (args?: any) => void;
75
77
  calendarElement: () => any;
76
78
  normalizeRange: (candidate: Date, value: Date | null) => Date | null;
@@ -74,6 +74,10 @@ export interface DateTimePickerSettings {
74
74
  * Specifies the `name` property of the `input` DOM element.
75
75
  */
76
76
  name?: string;
77
+ /**
78
+ * Renders a floating label for the DateTimePicker.
79
+ */
80
+ label?: string;
77
81
  /**
78
82
  * Specifies the value of the placeholder.
79
83
  */
@@ -132,4 +136,9 @@ export interface DateTimePickerSettings {
132
136
  * Specifies the validate of the DateTimePicker.
133
137
  */
134
138
  validate?: boolean;
139
+ /**
140
+ * Controls the form error message of the component. If set to an empty string, no error will be thrown.
141
+ *
142
+ */
143
+ validationMessage?: string;
135
144
  }
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-dateinputs',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1631596578,
8
+ publishDate: 1633441296,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };
@@ -46,6 +46,7 @@ export interface TimeListState {
46
46
  * @hidden
47
47
  */
48
48
  export interface TimeListComputed {
49
+ [key: string]: any;
49
50
  animate: boolean;
50
51
  }
51
52
  /**
@@ -58,6 +59,7 @@ export interface TimeListData {
58
59
  * @hidden
59
60
  */
60
61
  export interface TimeListMethods {
62
+ [key: string]: any;
61
63
  focus: (args?: any) => void;
62
64
  itemOffset: (scrollTop: number) => number;
63
65
  calculateHeights: () => void;
@@ -58,6 +58,7 @@ export interface TimePartData {
58
58
  * @hidden
59
59
  */
60
60
  export interface TimePartComputed {
61
+ [key: string]: any;
61
62
  element: HTMLSpanElement | null;
62
63
  computedValue: Date;
63
64
  intl: IntlService;
@@ -68,6 +69,7 @@ export interface TimePartComputed {
68
69
  * @hidden
69
70
  */
70
71
  export interface TimePartMethods {
72
+ [key: string]: any;
71
73
  focus: (args?: any) => void;
72
74
  timeFormatReducer: (acc: string, current: DateFormatPart) => any;
73
75
  timeFormatFilter: (part: DateFormatPart, index: number, all: DateFormatPart[]) => boolean;
@@ -47,6 +47,7 @@ export interface TimePickerState {
47
47
  _popupId: string;
48
48
  _element: HTMLSpanElement | null;
49
49
  _dateInput: any;
50
+ dateInputRef: any;
50
51
  _timeSelector: any;
51
52
  _wrapper: any;
52
53
  _anchor: any;
@@ -62,6 +63,7 @@ export interface TimePickerState {
62
63
  * @hidden
63
64
  */
64
65
  export interface TimePickerMethods {
66
+ [key: string]: any;
65
67
  validity: () => FormComponentValidity;
66
68
  focus: () => void;
67
69
  setDateInputRef: (dateInput: any) => void;
@@ -82,6 +84,7 @@ export interface TimePickerMethods {
82
84
  timeFocus: (event: any) => void;
83
85
  timeBlur: (event: any) => void;
84
86
  createBlurTimeout: () => void;
87
+ getDateInputText: () => string;
85
88
  }
86
89
  /**
87
90
  * @hidden
@@ -89,11 +92,13 @@ export interface TimePickerMethods {
89
92
  export interface TimePickerData {
90
93
  currentValue: Date | null;
91
94
  currentShow: boolean;
95
+ isFocused: boolean;
92
96
  }
93
97
  /**
94
98
  * @hidden
95
99
  */
96
100
  export interface TimePickerComputed {
101
+ [key: string]: any;
97
102
  timeSelector: any;
98
103
  computedValue: Date | null;
99
104
  computedShow: boolean;