@vaadin/date-time-picker 24.8.0-alpha9 → 24.8.0-rc1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/date-time-picker",
3
- "version": "24.8.0-alpha9",
3
+ "version": "24.8.0-rc1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,20 +37,20 @@
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
39
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.8.0-alpha9",
41
- "@vaadin/component-base": "24.8.0-alpha9",
42
- "@vaadin/custom-field": "24.8.0-alpha9",
43
- "@vaadin/date-picker": "24.8.0-alpha9",
44
- "@vaadin/field-base": "24.8.0-alpha9",
45
- "@vaadin/time-picker": "24.8.0-alpha9",
46
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha9",
47
- "@vaadin/vaadin-material-styles": "24.8.0-alpha9",
48
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
40
+ "@vaadin/a11y-base": "24.8.0-rc1",
41
+ "@vaadin/component-base": "24.8.0-rc1",
42
+ "@vaadin/custom-field": "24.8.0-rc1",
43
+ "@vaadin/date-picker": "24.8.0-rc1",
44
+ "@vaadin/field-base": "24.8.0-rc1",
45
+ "@vaadin/time-picker": "24.8.0-rc1",
46
+ "@vaadin/vaadin-lumo-styles": "24.8.0-rc1",
47
+ "@vaadin/vaadin-material-styles": "24.8.0-rc1",
48
+ "@vaadin/vaadin-themable-mixin": "24.8.0-rc1",
49
49
  "lit": "^3.0.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@vaadin/chai-plugins": "24.8.0-alpha9",
53
- "@vaadin/test-runner-commands": "24.8.0-alpha9",
52
+ "@vaadin/chai-plugins": "24.8.0-rc1",
53
+ "@vaadin/test-runner-commands": "24.8.0-rc1",
54
54
  "@vaadin/testing-helpers": "^1.1.0",
55
55
  "sinon": "^18.0.0"
56
56
  },
@@ -58,5 +58,5 @@
58
58
  "web-types.json",
59
59
  "web-types.lit.json"
60
60
  ],
61
- "gitHead": "4de3809275ddfd733b0d13fd02af8faf73eb6770"
61
+ "gitHead": "901d3eb9224983fd81e222e2fa5c7c207f9a6e46"
62
62
  }
@@ -305,6 +305,7 @@ export const DateTimePickerMixin = (superClass) =>
305
305
  // Default value for "max" property of vaadin-time-picker (for removing constraint)
306
306
  this.__defaultTimeMaxValue = '23:59:59.999';
307
307
 
308
+ this.__onGlobalClick = this.__onGlobalClick.bind(this);
308
309
  this.__changeEventHandler = this.__changeEventHandler.bind(this);
309
310
  this.__valueChangedEventHandler = this.__valueChangedEventHandler.bind(this);
310
311
  this.__openedChangedEventHandler = this.__openedChangedEventHandler.bind(this);
@@ -315,12 +316,38 @@ export const DateTimePickerMixin = (superClass) =>
315
316
  return [this.__datePicker, this.__timePicker];
316
317
  }
317
318
 
319
+ /** @private */
320
+ get __filledPickers() {
321
+ return this.__pickers.filter((picker) => picker.value || picker.__unparsableValue);
322
+ }
323
+
318
324
  /** @private */
319
325
  get __formattedValue() {
320
326
  const values = this.__pickers.map((picker) => picker.value);
321
327
  return values.every(Boolean) ? values.join('T') : '';
322
328
  }
323
329
 
330
+ /**
331
+ * Values:
332
+ * - ""
333
+ * - "fooT"
334
+ * - "Tbar"
335
+ * - "fooTbar"
336
+ * - "T12:00"
337
+ * - "fooT12:00"
338
+ * - "2024-01-01T"
339
+ * - "2024-01-01Tbar"
340
+ *
341
+ * @private
342
+ */
343
+ get __unparsableValue() {
344
+ if (this.__filledPickers.length > 0 && !this.__pickers.every((picker) => picker.value)) {
345
+ return this.__pickers.map((picker) => picker.value || picker.__unparsableValue).join('T');
346
+ }
347
+
348
+ return '';
349
+ }
350
+
324
351
  /** @protected */
325
352
  ready() {
326
353
  super.ready();
@@ -347,12 +374,49 @@ export const DateTimePickerMixin = (superClass) =>
347
374
  this.ariaTarget = this;
348
375
  }
349
376
 
377
+ /** @protected */
378
+ connectedCallback() {
379
+ super.connectedCallback();
380
+ document.addEventListener('click', this.__onGlobalClick, true);
381
+ }
382
+
383
+ /** @protected */
384
+ disconnectedCallback() {
385
+ super.disconnectedCallback();
386
+ document.removeEventListener('click', this.__onGlobalClick, true);
387
+ }
388
+
350
389
  focus() {
351
390
  if (this.__datePicker) {
352
391
  this.__datePicker.focus();
353
392
  }
354
393
  }
355
394
 
395
+ /** @private */
396
+ __onGlobalClick(event) {
397
+ const isOpened = this.__datePicker.opened || this.__timePicker.opened;
398
+ if (!isOpened) {
399
+ return;
400
+ }
401
+
402
+ const isOutsideClick = event.composedPath().every((node) => {
403
+ return ![
404
+ this.__datePicker,
405
+ this.__datePicker.$.overlay,
406
+ this.__timePicker,
407
+ this.__timePicker.$.comboBox.$.overlay,
408
+ ].includes(node);
409
+ });
410
+
411
+ if (isOutsideClick) {
412
+ this.__outsideClickInProgress = true;
413
+
414
+ setTimeout(() => {
415
+ this.__outsideClickInProgress = false;
416
+ });
417
+ }
418
+ }
419
+
356
420
  /**
357
421
  * Override method inherited from `FocusMixin` to validate on blur.
358
422
  * @param {boolean} focused
@@ -365,7 +429,7 @@ export const DateTimePickerMixin = (superClass) =>
365
429
  // Do not validate when focusout is caused by document
366
430
  // losing focus, which happens on browser tab switch.
367
431
  if (!focused && document.hasFocus()) {
368
- this._requestValidation();
432
+ this.__commitPendingValueChange();
369
433
  }
370
434
  }
371
435
 
@@ -379,12 +443,12 @@ export const DateTimePickerMixin = (superClass) =>
379
443
  */
380
444
  _shouldRemoveFocus(event) {
381
445
  const target = event.relatedTarget;
382
- const overlayContent = this.__datePicker._overlayContent;
383
446
 
384
447
  if (
448
+ this.__datePicker.opened ||
449
+ this.__timePicker.opened ||
385
450
  this.__datePicker.contains(target) ||
386
- this.__timePicker.contains(target) ||
387
- (overlayContent && overlayContent.contains(target))
451
+ this.__timePicker.contains(target)
388
452
  ) {
389
453
  return false;
390
454
  }
@@ -408,22 +472,35 @@ export const DateTimePickerMixin = (superClass) =>
408
472
  __changeEventHandler(event) {
409
473
  event.stopPropagation();
410
474
 
411
- if (this.__dispatchChangeForValue === this.value) {
412
- this._requestValidation();
413
- this.__dispatchChange();
475
+ const isAlreadyInvalid = this.invalid;
476
+ const filledPickers = this.__filledPickers;
477
+ if (filledPickers.length === 1 && filledPickers[0].checkValidity() && !isAlreadyInvalid) {
478
+ // Skip if (a) only one picker is filled, (b) its value is valid by itself, and (c) the user
479
+ // is still interacting with the field. This is to give the user a chance to finish the input
480
+ // before giving him feedback. However, if the field is already in the invalid state due to
481
+ // a previous error, proceed to committing the value to get the error message updated.
482
+ return;
483
+ }
484
+
485
+ if (this.__hasPendingValueChange) {
486
+ this.__commitPendingValueChange();
414
487
  }
415
- this.__dispatchChangeForValue = undefined;
416
488
  }
417
489
 
418
490
  /** @private */
419
491
  __openedChangedEventHandler() {
420
492
  const opened = this.__datePicker.opened || this.__timePicker.opened;
421
493
  this.style.pointerEvents = opened ? 'auto' : '';
494
+
495
+ if (!opened && this.__outsideClickInProgress) {
496
+ this.__commitPendingValueChange();
497
+ }
422
498
  }
423
499
 
424
500
  /** @private */
425
501
  __addInputListeners(node) {
426
502
  node.addEventListener('change', this.__changeEventHandler);
503
+ node.addEventListener('unparsable-change', this.__changeEventHandler);
427
504
  node.addEventListener('value-changed', this.__valueChangedEventHandler);
428
505
  node.addEventListener('opened-changed', this.__openedChangedEventHandler);
429
506
  }
@@ -431,6 +508,7 @@ export const DateTimePickerMixin = (superClass) =>
431
508
  /** @private */
432
509
  __removeInputListeners(node) {
433
510
  node.removeEventListener('change', this.__changeEventHandler);
511
+ node.removeEventListener('unparsable-change', this.__changeEventHandler);
434
512
  node.removeEventListener('value-changed', this.__valueChangedEventHandler);
435
513
  node.removeEventListener('opened-changed', this.__openedChangedEventHandler);
436
514
  }
@@ -724,8 +802,27 @@ export const DateTimePickerMixin = (superClass) =>
724
802
  */
725
803
  checkValidity() {
726
804
  const hasInvalidPickers = this.__pickers.some((picker) => !picker.checkValidity());
805
+ const hasOnlyOneFilledPicker = this.__filledPickers.length === 1;
727
806
  const hasEmptyRequiredPickers = this.required && this.__pickers.some((picker) => !picker.value);
728
- return !hasInvalidPickers && !hasEmptyRequiredPickers;
807
+ return !hasInvalidPickers && !hasEmptyRequiredPickers && !hasOnlyOneFilledPicker;
808
+ }
809
+
810
+ /** @private */
811
+ __commitPendingValueChange() {
812
+ this._requestValidation();
813
+ if (this.__committedValue !== this.value) {
814
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
815
+ } else if (this.__committedUnparsableValue !== this.__unparsableValue) {
816
+ this.dispatchEvent(new CustomEvent('unparsable-change'));
817
+ }
818
+
819
+ this.__committedValue = this.value;
820
+ this.__committedUnparsableValue = this.__unparsableValue;
821
+ }
822
+
823
+ /** @private */
824
+ get __hasPendingValueChange() {
825
+ return this.__committedValue !== this.value || this.__committedUnparsableValue !== this.__unparsableValue;
729
826
  }
730
827
 
731
828
  /**
@@ -769,8 +866,9 @@ export const DateTimePickerMixin = (superClass) =>
769
866
  __valueChanged(value, oldValue) {
770
867
  this.__handleDateTimeChange('value', '__selectedDateTime', value, oldValue);
771
868
 
772
- if (oldValue !== undefined) {
773
- this.__dispatchChangeForValue = value;
869
+ if (!this.__keepCommittedValue) {
870
+ this.__committedValue = value;
871
+ this.__committedUnparsableValue = '';
774
872
  }
775
873
 
776
874
  this.toggleAttribute('has-value', !!value);
@@ -839,8 +937,12 @@ export const DateTimePickerMixin = (superClass) =>
839
937
  }
840
938
 
841
939
  this.__ignoreInputValueChange = true;
940
+ this.__keepCommittedValue = true;
941
+
842
942
  this.__updateTimePickerMinMax();
843
943
  this.value = this.__formattedValue;
944
+
945
+ this.__keepCommittedValue = false;
844
946
  this.__ignoreInputValueChange = false;
845
947
  }
846
948
 
@@ -93,7 +93,30 @@ export interface DateTimePickerEventMap extends DateTimePickerCustomEventMap, HT
93
93
  *
94
94
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
95
95
  *
96
+ * ### Change events
97
+ *
98
+ * Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
99
+ * the component can fire either a `change` event or an `unparsable-change` event:
100
+ *
101
+ * Value change | Event
102
+ * :------------------------|:------------------
103
+ * empty => parsable | change
104
+ * empty => unparsable | unparsable-change
105
+ * parsable => empty | change
106
+ * parsable => parsable | change
107
+ * parsable => unparsable | change
108
+ * unparsable => empty | unparsable-change
109
+ * unparsable => parsable | change
110
+ * unparsable => unparsable | unparsable-change
111
+ * incomplete => empty | unparsable-change
112
+ * incomplete => parsable | change
113
+ * incomplete => unparsable | unparsable-change
114
+ * empty => incomplete | unparsable-change
115
+ * parsable => incomplete | change
116
+ * unparsable => incomplete | unparsable-change
117
+ *
96
118
  * @fires {Event} change - Fired when the user commits a value change.
119
+ * @fires {Event} unparsable-change - Fired when the user commits an unparsable or incomplete value change and there is no change event.
97
120
  * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
98
121
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
99
122
  * @fires {CustomEvent} validated - Fired whenever the field is validated.
@@ -64,7 +64,30 @@ registerStyles('vaadin-date-time-picker', inputFieldShared, { moduleId: 'vaadin-
64
64
  *
65
65
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
66
66
  *
67
+ * ### Change events
68
+ *
69
+ * Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
70
+ * the component can fire either a `change` event or an `unparsable-change` event:
71
+ *
72
+ * Value change | Event
73
+ * :------------------------|:------------------
74
+ * empty => parsable | change
75
+ * empty => unparsable | unparsable-change
76
+ * parsable => empty | change
77
+ * parsable => parsable | change
78
+ * parsable => unparsable | change
79
+ * unparsable => empty | unparsable-change
80
+ * unparsable => parsable | change
81
+ * unparsable => unparsable | unparsable-change
82
+ * incomplete => empty | unparsable-change
83
+ * incomplete => parsable | change
84
+ * incomplete => unparsable | unparsable-change
85
+ * empty => incomplete | unparsable-change
86
+ * parsable => incomplete | change
87
+ * unparsable => incomplete | unparsable-change
88
+ *
67
89
  * @fires {Event} change - Fired when the user commits a value change.
90
+ * @fires {Event} unparsable-change - Fired when the user commits an unparsable or incomplete value change and there is no change event.
68
91
  * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
69
92
  * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
70
93
  * @fires {CustomEvent} validated - Fired whenever the field is validated.
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-time-picker",
4
- "version": "24.8.0-alpha9",
4
+ "version": "24.8.0-rc1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-date-time-picker",
11
- "description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change\nincomplete => empty | unparsable-change\nincomplete => parsable | change\nincomplete => unparsable | unparsable-change\nempty => incomplete | unparsable-change\nparsable => incomplete | change\nunparsable => incomplete | unparsable-change",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -235,7 +235,7 @@
235
235
  },
236
236
  {
237
237
  "name": "overlay-class",
238
- "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-time-picker#property-overlayClass)",
238
+ "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-time-picker#property-overlayClass)",
239
239
  "value": {
240
240
  "type": [
241
241
  "string",
@@ -483,7 +483,7 @@
483
483
  },
484
484
  {
485
485
  "name": "i18n",
486
- "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-time-picker).",
486
+ "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-time-picker).",
487
487
  "value": {
488
488
  "type": [
489
489
  "DateTimePickerI18n"
@@ -492,7 +492,7 @@
492
492
  },
493
493
  {
494
494
  "name": "overlayClass",
495
- "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-time-picker#property-overlayClass)",
495
+ "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-time-picker#property-overlayClass)",
496
496
  "value": {
497
497
  "type": [
498
498
  "string",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-time-picker",
4
- "version": "24.8.0-alpha9",
4
+ "version": "24.8.0-rc1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-date-time-picker",
19
- "description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change\nincomplete => empty | unparsable-change\nincomplete => parsable | change\nincomplete => unparsable | unparsable-change\nempty => incomplete | unparsable-change\nparsable => incomplete | change\nunparsable => incomplete | unparsable-change",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -168,14 +168,14 @@
168
168
  },
169
169
  {
170
170
  "name": ".i18n",
171
- "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-time-picker).",
171
+ "description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-time-picker).",
172
172
  "value": {
173
173
  "kind": "expression"
174
174
  }
175
175
  },
176
176
  {
177
177
  "name": ".overlayClass",
178
- "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-alpha9/#/elements/vaadin-time-picker#property-overlayClass)",
178
+ "description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.8.0-rc1/#/elements/vaadin-time-picker#property-overlayClass)",
179
179
  "value": {
180
180
  "kind": "expression"
181
181
  }
@@ -1 +0,0 @@
1
- export * from './vaadin-date-time-picker.js';