@vaadin/date-time-picker 25.3.0-alpha12 → 25.3.0-alpha14

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.
@@ -127,6 +127,16 @@
127
127
  "description": "A placeholder string for the date field.",
128
128
  "attribute": "date-placeholder"
129
129
  },
130
+ {
131
+ "kind": "field",
132
+ "name": "defaultTime",
133
+ "privacy": "public",
134
+ "type": {
135
+ "text": "string"
136
+ },
137
+ "description": "The time part to set automatically when the user commits a date while\nthe time picker is empty.\n\nSupports same time formats as the `value` property, without the date\npart. Precision exceeding the one defined by `step` is discarded,\ne.g. `09:30:45` is applied as `09:30` with the default `step`.\n\nThe time part is set when a date is committed while the time picker\nis empty — never for programmatic or initial values. A value outside\n`min` / `max` is applied as-is and makes the field invalid.\n\nWhen not set, selecting a date leaves the time part empty. A string\nthat is not a valid ISO 8601 time is ignored and logs a warning.",
138
+ "attribute": "default-time"
139
+ },
130
140
  {
131
141
  "kind": "field",
132
142
  "name": "disabled",
@@ -437,6 +447,14 @@
437
447
  "description": "A placeholder string for the date field.",
438
448
  "fieldName": "datePlaceholder"
439
449
  },
450
+ {
451
+ "name": "default-time",
452
+ "type": {
453
+ "text": "string"
454
+ },
455
+ "description": "The time part to set automatically when the user commits a date while\nthe time picker is empty.\n\nSupports same time formats as the `value` property, without the date\npart. Precision exceeding the one defined by `step` is discarded,\ne.g. `09:30:45` is applied as `09:30` with the default `step`.\n\nThe time part is set when a date is committed while the time picker\nis empty — never for programmatic or initial values. A value outside\n`min` / `max` is applied as-is and makes the field invalid.\n\nWhen not set, selecting a date leaves the time part empty. A string\nthat is not a valid ISO 8601 time is ignored and logs a warning.",
456
+ "fieldName": "defaultTime"
457
+ },
440
458
  {
441
459
  "name": "disabled",
442
460
  "type": {
@@ -772,6 +790,20 @@
772
790
  "module": "src/vaadin-date-time-picker-mixin.js"
773
791
  }
774
792
  },
793
+ {
794
+ "kind": "field",
795
+ "name": "defaultTime",
796
+ "privacy": "public",
797
+ "type": {
798
+ "text": "string"
799
+ },
800
+ "description": "The time part to set automatically when the user commits a date while\nthe time picker is empty.\n\nSupports same time formats as the `value` property, without the date\npart. Precision exceeding the one defined by `step` is discarded,\ne.g. `09:30:45` is applied as `09:30` with the default `step`.\n\nThe time part is set when a date is committed while the time picker\nis empty — never for programmatic or initial values. A value outside\n`min` / `max` is applied as-is and makes the field invalid.\n\nWhen not set, selecting a date leaves the time part empty. A string\nthat is not a valid ISO 8601 time is ignored and logs a warning.",
801
+ "attribute": "default-time",
802
+ "inheritedFrom": {
803
+ "name": "DateTimePickerMixin",
804
+ "module": "src/vaadin-date-time-picker-mixin.js"
805
+ }
806
+ },
775
807
  {
776
808
  "kind": "field",
777
809
  "name": "disabled",
@@ -1155,6 +1187,18 @@
1155
1187
  "module": "src/vaadin-date-time-picker-mixin.js"
1156
1188
  }
1157
1189
  },
1190
+ {
1191
+ "name": "default-time",
1192
+ "type": {
1193
+ "text": "string"
1194
+ },
1195
+ "description": "The time part to set automatically when the user commits a date while\nthe time picker is empty.\n\nSupports same time formats as the `value` property, without the date\npart. Precision exceeding the one defined by `step` is discarded,\ne.g. `09:30:45` is applied as `09:30` with the default `step`.\n\nThe time part is set when a date is committed while the time picker\nis empty — never for programmatic or initial values. A value outside\n`min` / `max` is applied as-is and makes the field invalid.\n\nWhen not set, selecting a date leaves the time part empty. A string\nthat is not a valid ISO 8601 time is ignored and logs a warning.",
1196
+ "fieldName": "defaultTime",
1197
+ "inheritedFrom": {
1198
+ "name": "DateTimePickerMixin",
1199
+ "module": "src/vaadin-date-time-picker-mixin.js"
1200
+ }
1201
+ },
1158
1202
  {
1159
1203
  "name": "disabled",
1160
1204
  "type": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/date-time-picker",
3
- "version": "25.3.0-alpha12",
3
+ "version": "25.3.0-alpha14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,20 +35,20 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.3.0-alpha12",
39
- "@vaadin/component-base": "25.3.0-alpha12",
40
- "@vaadin/date-picker": "25.3.0-alpha12",
41
- "@vaadin/field-base": "25.3.0-alpha12",
42
- "@vaadin/time-picker": "25.3.0-alpha12",
43
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha12",
38
+ "@vaadin/a11y-base": "25.3.0-alpha14",
39
+ "@vaadin/component-base": "25.3.0-alpha14",
40
+ "@vaadin/date-picker": "25.3.0-alpha14",
41
+ "@vaadin/field-base": "25.3.0-alpha14",
42
+ "@vaadin/time-picker": "25.3.0-alpha14",
43
+ "@vaadin/vaadin-themable-mixin": "25.3.0-alpha14",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/aura": "25.3.0-alpha12",
48
- "@vaadin/chai-plugins": "25.3.0-alpha12",
49
- "@vaadin/test-runner-commands": "25.3.0-alpha12",
47
+ "@vaadin/aura": "25.3.0-alpha14",
48
+ "@vaadin/chai-plugins": "25.3.0-alpha14",
49
+ "@vaadin/test-runner-commands": "25.3.0-alpha14",
50
50
  "@vaadin/testing-helpers": "^2.0.0",
51
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha12",
51
+ "@vaadin/vaadin-lumo-styles": "25.3.0-alpha14",
52
52
  "sinon": "^22.0.0"
53
53
  },
54
54
  "customElements": "custom-elements.json",
@@ -56,5 +56,5 @@
56
56
  "web-types.json",
57
57
  "web-types.lit.json"
58
58
  ],
59
- "gitHead": "0f0337783efe38332f5dc6a8968f207d2982de4b"
59
+ "gitHead": "10a01ae7a1e278af50eda7255dbb68dafc0e4caf"
60
60
  }
@@ -119,6 +119,25 @@ export declare class DateTimePickerMixinClass {
119
119
  */
120
120
  initialPosition: string | null | undefined;
121
121
 
122
+ /**
123
+ * The time part to set automatically when the user commits a date while
124
+ * the time picker is empty.
125
+ *
126
+ * Supports same time formats as the `value` property, without the date
127
+ * part. Precision exceeding the one defined by `step` is discarded,
128
+ * e.g. `09:30:45` is applied as `09:30` with the default `step`.
129
+ *
130
+ * The time part is set when a date is committed while the time picker
131
+ * is empty — never for programmatic or initial values. A value outside
132
+ * `min` / `max` is applied as-is and makes the field invalid.
133
+ *
134
+ * When not set, selecting a date leaves the time part empty. A string
135
+ * that is not a valid ISO 8601 time is ignored and logs a warning.
136
+ *
137
+ * @attr {string} default-time
138
+ */
139
+ defaultTime: string | null | undefined;
140
+
122
141
  /**
123
142
  * Set true to display ISO-8601 week numbers in the calendar. Notice that
124
143
  * displaying week numbers is only supported when `i18n.firstDayOfWeek`
@@ -9,6 +9,7 @@ import { setOrRemoveAttribute } from '@vaadin/component-base/src/dom-utils.js';
9
9
  import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
10
10
  import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
11
11
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
12
+ import { issueWarning } from '@vaadin/component-base/src/warnings.js';
12
13
  import {
13
14
  dateEquals,
14
15
  formatUTCISODate,
@@ -169,6 +170,28 @@ export const DateTimePickerMixin = (superClass) =>
169
170
  sync: true,
170
171
  },
171
172
 
173
+ /**
174
+ * The time part to set automatically when the user commits a date while
175
+ * the time picker is empty.
176
+ *
177
+ * Supports same time formats as the `value` property, without the date
178
+ * part. Precision exceeding the one defined by `step` is discarded,
179
+ * e.g. `09:30:45` is applied as `09:30` with the default `step`.
180
+ *
181
+ * The time part is set when a date is committed while the time picker
182
+ * is empty — never for programmatic or initial values. A value outside
183
+ * `min` / `max` is applied as-is and makes the field invalid.
184
+ *
185
+ * When not set, selecting a date leaves the time part empty. A string
186
+ * that is not a valid ISO 8601 time is ignored and logs a warning.
187
+ *
188
+ * @attr {string} default-time
189
+ */
190
+ defaultTime: {
191
+ type: String,
192
+ sync: true,
193
+ },
194
+
172
195
  /**
173
196
  * Set true to display ISO-8601 week numbers in the calendar. Notice that
174
197
  * displaying week numbers is only supported when `i18n.firstDayOfWeek`
@@ -526,6 +549,17 @@ export const DateTimePickerMixin = (superClass) =>
526
549
  __changeEventHandler(event) {
527
550
  event.stopPropagation();
528
551
 
552
+ if (
553
+ event.target === this.__datePicker &&
554
+ this.__datePicker.value &&
555
+ !(this.__timePicker.value || this.__timePicker.__unparsableValue)
556
+ ) {
557
+ const defaultTime = this.__normalizeDefaultTime();
558
+ if (defaultTime) {
559
+ this.__timePicker.value = defaultTime;
560
+ }
561
+ }
562
+
529
563
  const isAlreadyInvalid = this.invalid;
530
564
  const filledPickers = this.__filledPickers;
531
565
  if (filledPickers.length === 1 && filledPickers[0].checkValidity() && !isAlreadyInvalid) {
@@ -835,6 +869,16 @@ export const DateTimePickerMixin = (superClass) =>
835
869
  return `${dateValue}T${timeValue}`;
836
870
  }
837
871
 
872
+ /**
873
+ * Time object to string (ISO time)
874
+ * @param {object} timeObj
875
+ * @return {string} e.g. 'hh:mm', 'hh:mm:ss', 'hh:mm:ss.fff' (depending on precision defined by "step" property)
876
+ * @private
877
+ */
878
+ __formatTimeISO(timeObj) {
879
+ return formatISOTime(validateTime(timeObj, this.step));
880
+ }
881
+
838
882
  /**
839
883
  * Date object to string (ISO time)
840
884
  * @param {Date} date
@@ -842,17 +886,33 @@ export const DateTimePickerMixin = (superClass) =>
842
886
  * @private
843
887
  */
844
888
  __dateToIsoTimeString(date) {
845
- return formatISOTime(
846
- validateTime(
847
- {
848
- hours: date.getUTCHours(),
849
- minutes: date.getUTCMinutes(),
850
- seconds: date.getUTCSeconds(),
851
- milliseconds: date.getUTCMilliseconds(),
852
- },
853
- this.step,
854
- ),
855
- );
889
+ return this.__formatTimeISO({
890
+ hours: date.getUTCHours(),
891
+ minutes: date.getUTCMinutes(),
892
+ seconds: date.getUTCSeconds(),
893
+ milliseconds: date.getUTCMilliseconds(),
894
+ });
895
+ }
896
+
897
+ /**
898
+ * `defaultTime` to string (ISO time), or an empty string when unset or unparsable.
899
+ * @return {string}
900
+ * @private
901
+ */
902
+ __normalizeDefaultTime() {
903
+ if (!this.defaultTime) {
904
+ return '';
905
+ }
906
+
907
+ const timeObj = parseISOTime(this.defaultTime);
908
+ if (!timeObj) {
909
+ issueWarning(
910
+ `<vaadin-date-time-picker> Ignored "defaultTime" that is not a valid ISO 8601 time: ${this.defaultTime}`,
911
+ );
912
+ return '';
913
+ }
914
+
915
+ return this.__formatTimeISO(timeObj);
856
916
  }
857
917
 
858
918
  /**
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": "25.3.0-alpha12",
4
+ "version": "25.3.0-alpha14",
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`input-fields` | The date and time pickers 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\n--------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`invalid` | Set when the element is invalid\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-date-time-picker-gap` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-required-indicator` |\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/25.3.0-alpha12/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha12/#/elements/vaadin-time-picker).\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",
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`input-fields` | The date and time pickers 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\n--------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`invalid` | Set when the element is invalid\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-date-time-picker-gap` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-required-indicator` |\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/25.3.0-alpha14/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha14/#/elements/vaadin-time-picker).\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": "accessible-description-ref",
@@ -64,6 +64,15 @@
64
64
  ]
65
65
  }
66
66
  },
67
+ {
68
+ "name": "default-time",
69
+ "description": "The time part to set automatically when the user commits a date while\nthe time picker is empty.\n\nSupports same time formats as the `value` property, without the date\npart. Precision exceeding the one defined by `step` is discarded,\ne.g. `09:30:45` is applied as `09:30` with the default `step`.\n\nThe time part is set when a date is committed while the time picker\nis empty — never for programmatic or initial values. A value outside\n`min` / `max` is applied as-is and makes the field invalid.\n\nWhen not set, selecting a date leaves the time part empty. A string\nthat is not a valid ISO 8601 time is ignored and logs a warning.",
70
+ "value": {
71
+ "type": [
72
+ "string"
73
+ ]
74
+ }
75
+ },
67
76
  {
68
77
  "name": "disabled",
69
78
  "description": "If true, the user cannot interact with this element.",
@@ -285,6 +294,15 @@
285
294
  ]
286
295
  }
287
296
  },
297
+ {
298
+ "name": "defaultTime",
299
+ "description": "The time part to set automatically when the user commits a date while\nthe time picker is empty.\n\nSupports same time formats as the `value` property, without the date\npart. Precision exceeding the one defined by `step` is discarded,\ne.g. `09:30:45` is applied as `09:30` with the default `step`.\n\nThe time part is set when a date is committed while the time picker\nis empty — never for programmatic or initial values. A value outside\n`min` / `max` is applied as-is and makes the field invalid.\n\nWhen not set, selecting a date leaves the time part empty. A string\nthat is not a valid ISO 8601 time is ignored and logs a warning.",
300
+ "value": {
301
+ "type": [
302
+ "string"
303
+ ]
304
+ }
305
+ },
288
306
  {
289
307
  "name": "disabled",
290
308
  "description": "If true, the user cannot interact with this element.",
@@ -314,7 +332,7 @@
314
332
  },
315
333
  {
316
334
  "name": "i18n",
317
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n\n```js\n{\n // Accessible label to the date picker.\n // The property works in conjunction with label and accessibleName defined on the field.\n // If both properties are defined, then accessibleName takes precedence.\n // Then, the dateLabel value is concatenated with it.\n dateLabel: undefined;\n\n // Accessible label to the time picker.\n // The property works in conjunction with label and accessibleName defined on the field.\n // If both properties are defined, then accessibleName takes precedence.\n // Then, the dateLabel value is concatenated with it.\n timeLabel: undefined;\n}\n```\n\nAdditionally, all i18n properties from\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha12/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha12/#/elements/vaadin-time-picker) are supported.",
335
+ "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n\n```js\n{\n // Accessible label to the date picker.\n // The property works in conjunction with label and accessibleName defined on the field.\n // If both properties are defined, then accessibleName takes precedence.\n // Then, the dateLabel value is concatenated with it.\n dateLabel: undefined;\n\n // Accessible label to the time picker.\n // The property works in conjunction with label and accessibleName defined on the field.\n // If both properties are defined, then accessibleName takes precedence.\n // Then, the dateLabel value is concatenated with it.\n timeLabel: undefined;\n}\n```\n\nAdditionally, all i18n properties from\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha14/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha14/#/elements/vaadin-time-picker) are supported.",
318
336
  "value": {
319
337
  "type": [
320
338
  "Object"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-time-picker",
4
- "version": "25.3.0-alpha12",
4
+ "version": "25.3.0-alpha14",
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`input-fields` | The date and time pickers 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\n--------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`invalid` | Set when the element is invalid\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-date-time-picker-gap` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-required-indicator` |\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/25.3.0-alpha12/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha12/#/elements/vaadin-time-picker).\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",
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`input-fields` | The date and time pickers 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\n--------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`invalid` | Set when the element is invalid\n`has-label` | Set when the element has a label\n`has-value` | Set when the element has a value\n`has-helper` | Set when the element has helper text\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-date-time-picker-gap` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-required-indicator` |\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/25.3.0-alpha14/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha14/#/elements/vaadin-time-picker).\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
  {
@@ -68,6 +68,13 @@
68
68
  "kind": "expression"
69
69
  }
70
70
  },
71
+ {
72
+ "name": ".defaultTime",
73
+ "description": "The time part to set automatically when the user commits a date while\nthe time picker is empty.\n\nSupports same time formats as the `value` property, without the date\npart. Precision exceeding the one defined by `step` is discarded,\ne.g. `09:30:45` is applied as `09:30` with the default `step`.\n\nThe time part is set when a date is committed while the time picker\nis empty — never for programmatic or initial values. A value outside\n`min` / `max` is applied as-is and makes the field invalid.\n\nWhen not set, selecting a date leaves the time part empty. A string\nthat is not a valid ISO 8601 time is ignored and logs a warning.",
74
+ "value": {
75
+ "kind": "expression"
76
+ }
77
+ },
71
78
  {
72
79
  "name": "?disabled",
73
80
  "description": "If true, the user cannot interact with this element.",
@@ -91,7 +98,7 @@
91
98
  },
92
99
  {
93
100
  "name": ".i18n",
94
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n\n```js\n{\n // Accessible label to the date picker.\n // The property works in conjunction with label and accessibleName defined on the field.\n // If both properties are defined, then accessibleName takes precedence.\n // Then, the dateLabel value is concatenated with it.\n dateLabel: undefined;\n\n // Accessible label to the time picker.\n // The property works in conjunction with label and accessibleName defined on the field.\n // If both properties are defined, then accessibleName takes precedence.\n // Then, the dateLabel value is concatenated with it.\n timeLabel: undefined;\n}\n```\n\nAdditionally, all i18n properties from\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha12/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha12/#/elements/vaadin-time-picker) are supported.",
101
+ "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n\n```js\n{\n // Accessible label to the date picker.\n // The property works in conjunction with label and accessibleName defined on the field.\n // If both properties are defined, then accessibleName takes precedence.\n // Then, the dateLabel value is concatenated with it.\n dateLabel: undefined;\n\n // Accessible label to the time picker.\n // The property works in conjunction with label and accessibleName defined on the field.\n // If both properties are defined, then accessibleName takes precedence.\n // Then, the dateLabel value is concatenated with it.\n timeLabel: undefined;\n}\n```\n\nAdditionally, all i18n properties from\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha14/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha14/#/elements/vaadin-time-picker) are supported.",
95
102
  "value": {
96
103
  "kind": "expression"
97
104
  }