@vaadin/date-picker 24.0.0-alpha9 → 24.0.0-beta1

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-picker",
3
- "version": "24.0.0-alpha9",
3
+ "version": "24.0.0-beta1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,23 +36,23 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.2.0",
39
- "@vaadin/button": "24.0.0-alpha9",
40
- "@vaadin/component-base": "24.0.0-alpha9",
41
- "@vaadin/field-base": "24.0.0-alpha9",
42
- "@vaadin/input-container": "24.0.0-alpha9",
43
- "@vaadin/overlay": "24.0.0-alpha9",
44
- "@vaadin/vaadin-lumo-styles": "24.0.0-alpha9",
45
- "@vaadin/vaadin-material-styles": "24.0.0-alpha9",
46
- "@vaadin/vaadin-themable-mixin": "24.0.0-alpha9"
39
+ "@vaadin/button": "24.0.0-beta1",
40
+ "@vaadin/component-base": "24.0.0-beta1",
41
+ "@vaadin/field-base": "24.0.0-beta1",
42
+ "@vaadin/input-container": "24.0.0-beta1",
43
+ "@vaadin/overlay": "24.0.0-beta1",
44
+ "@vaadin/vaadin-lumo-styles": "24.0.0-beta1",
45
+ "@vaadin/vaadin-material-styles": "24.0.0-beta1",
46
+ "@vaadin/vaadin-themable-mixin": "24.0.0-beta1"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@esm-bundle/chai": "^4.3.4",
50
- "@vaadin/testing-helpers": "^0.3.2",
50
+ "@vaadin/testing-helpers": "^0.4.0",
51
51
  "sinon": "^13.0.2"
52
52
  },
53
53
  "web-types": [
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "cc3f747164041566b300bde4b105d2475649e93f"
57
+ "gitHead": "c5b48921a62482746df8e46994b37e1490fec27e"
58
58
  }
@@ -1,5 +1,3 @@
1
- export { getISOWeekNumber };
2
-
3
1
  /**
4
2
  * Get ISO 8601 week number for the given date.
5
3
  *
@@ -7,8 +5,6 @@ export { getISOWeekNumber };
7
5
  */
8
6
  declare function getISOWeekNumber(Date: Date): number;
9
7
 
10
- export { dateEquals };
11
-
12
8
  /**
13
9
  * Check if two dates are equal.
14
10
  *
@@ -16,8 +12,6 @@ export { dateEquals };
16
12
  */
17
13
  declare function dateEquals(date1: Date | null, date2: Date | null): boolean;
18
14
 
19
- export { dateAllowed };
20
-
21
15
  /**
22
16
  * Check if the given date is in the range of allowed dates.
23
17
  *
@@ -25,8 +19,6 @@ export { dateAllowed };
25
19
  */
26
20
  declare function dateAllowed(date: Date, min: Date | null, max: Date | null): boolean;
27
21
 
28
- export { getClosestDate };
29
-
30
22
  /**
31
23
  * Get closest date from array of dates.
32
24
  *
@@ -34,8 +26,6 @@ export { getClosestDate };
34
26
  */
35
27
  declare function getClosestDate(date: Date, dates: Date[]): Date;
36
28
 
37
- export { extractDateParts };
38
-
39
29
  /**
40
30
  * Extracts the basic component parts of a date (day, month and year)
41
31
  * to the expected format.
@@ -47,16 +37,12 @@ declare function extractDateParts(date: Date): { day: number; month: number; yea
47
37
  */
48
38
  declare function dateAfterXMonths(months: number): number;
49
39
 
50
- export { dateAfterXMonths };
51
-
52
40
  /**
53
41
  * Calculate the year of the date based on the provided reference date
54
42
  * Gets a two-digit year and returns a full year.
55
43
  */
56
44
  declare function getAdjustedYear(referenceDate: Date, year: number, month?: number, day?: number): Date;
57
45
 
58
- export { getAdjustedYear };
59
-
60
46
  /**
61
47
  * Parse date string of one of the following date formats:
62
48
  * - ISO 8601 `"YYYY-MM-DD"`
@@ -64,4 +50,13 @@ export { getAdjustedYear };
64
50
  */
65
51
  declare function parseDate(str: string): Date;
66
52
 
67
- export { parseDate };
53
+ export {
54
+ getISOWeekNumber,
55
+ dateEquals,
56
+ dateAllowed,
57
+ getClosestDate,
58
+ extractDateParts,
59
+ dateAfterXMonths,
60
+ getAdjustedYear,
61
+ parseDate,
62
+ };
@@ -96,14 +96,6 @@ class DatePickerLight extends ThemableMixin(DatePickerMixin(ValidateMixin(Polyme
96
96
  };
97
97
  }
98
98
 
99
- /** @protected */
100
- connectedCallback() {
101
- super.connectedCallback();
102
- const cssSelector = 'vaadin-text-field,.input';
103
- this._setInputElement(this.querySelector(cssSelector));
104
- this._setFocusElement(this.inputElement);
105
- }
106
-
107
99
  /** @return {string | undefined} */
108
100
  get _inputValue() {
109
101
  return this.inputElement && this.inputElement[dashToCamelCase(this.attrForValue)];
@@ -115,6 +107,14 @@ class DatePickerLight extends ThemableMixin(DatePickerMixin(ValidateMixin(Polyme
115
107
  }
116
108
  }
117
109
 
110
+ /** @protected */
111
+ connectedCallback() {
112
+ super.connectedCallback();
113
+ const cssSelector = 'vaadin-text-field,.input';
114
+ this._setInputElement(this.querySelector(cssSelector));
115
+ this._setFocusElement(this.inputElement);
116
+ }
117
+
118
118
  // Workaround https://github.com/vaadin/web-components/issues/2855
119
119
  /** @protected */
120
120
  _openedChanged(opened) {
@@ -344,6 +344,14 @@ export const DatePickerMixin = (subclass) =>
344
344
  return [...super.constraints, 'min', 'max'];
345
345
  }
346
346
 
347
+ constructor() {
348
+ super();
349
+
350
+ this._boundOnClick = this._onClick.bind(this);
351
+ this._boundOnScroll = this._onScroll.bind(this);
352
+ this._boundOverlayRenderer = this._overlayRenderer.bind(this);
353
+ }
354
+
347
355
  /**
348
356
  * Override a getter from `InputControlMixin` to make it optional
349
357
  * and to prevent warning when a clear button is missing,
@@ -355,18 +363,6 @@ export const DatePickerMixin = (subclass) =>
355
363
  return null;
356
364
  }
357
365
 
358
- /** @protected */
359
- get _inputValue() {
360
- return this.inputElement ? this.inputElement.value : undefined;
361
- }
362
-
363
- /** @protected */
364
- set _inputValue(value) {
365
- if (this.inputElement) {
366
- this.inputElement.value = value;
367
- }
368
- }
369
-
370
366
  /** @private */
371
367
  get _nativeInput() {
372
368
  if (this.inputElement) {
@@ -376,12 +372,16 @@ export const DatePickerMixin = (subclass) =>
376
372
  return null;
377
373
  }
378
374
 
379
- constructor() {
380
- super();
375
+ /** @protected */
376
+ get _inputValue() {
377
+ return this.inputElement ? this.inputElement.value : undefined;
378
+ }
381
379
 
382
- this._boundOnClick = this._onClick.bind(this);
383
- this._boundOnScroll = this._onScroll.bind(this);
384
- this._boundOverlayRenderer = this._overlayRenderer.bind(this);
380
+ /** @protected */
381
+ set _inputValue(value) {
382
+ if (this.inputElement) {
383
+ this.inputElement.value = value;
384
+ }
385
385
  }
386
386
 
387
387
  /**
@@ -118,6 +118,71 @@ export class InfiniteScroller extends PolymerElement {
118
118
  };
119
119
  }
120
120
 
121
+ /**
122
+ * @return {number}
123
+ */
124
+ get bufferOffset() {
125
+ return this._buffers[0].offsetTop;
126
+ }
127
+
128
+ /**
129
+ * @return {number}
130
+ */
131
+ get itemHeight() {
132
+ if (!this._itemHeightVal) {
133
+ const itemHeight = getComputedStyle(this).getPropertyValue('--vaadin-infinite-scroller-item-height');
134
+ // Use background-position temp inline style for unit conversion
135
+ const tmpStyleProp = 'background-position';
136
+ this.$.fullHeight.style.setProperty(tmpStyleProp, itemHeight);
137
+ const itemHeightPx = getComputedStyle(this.$.fullHeight).getPropertyValue(tmpStyleProp);
138
+ this.$.fullHeight.style.removeProperty(tmpStyleProp);
139
+ this._itemHeightVal = parseFloat(itemHeightPx);
140
+ }
141
+
142
+ return this._itemHeightVal;
143
+ }
144
+
145
+ /** @private */
146
+ get _bufferHeight() {
147
+ return this.itemHeight * this.bufferSize;
148
+ }
149
+
150
+ /**
151
+ * @return {number}
152
+ */
153
+ get position() {
154
+ return (this.$.scroller.scrollTop - this._buffers[0].translateY) / this.itemHeight + this._firstIndex;
155
+ }
156
+
157
+ /**
158
+ * Current scroller position as index. Can be a fractional number.
159
+ *
160
+ * @type {number}
161
+ */
162
+ set position(index) {
163
+ this._preventScrollEvent = true;
164
+ if (index > this._firstIndex && index < this._firstIndex + this.bufferSize * 2) {
165
+ this.$.scroller.scrollTop = this.itemHeight * (index - this._firstIndex) + this._buffers[0].translateY;
166
+ } else {
167
+ this._initialIndex = ~~index;
168
+ this._reset();
169
+ this._scrollDisabled = true;
170
+ this.$.scroller.scrollTop += (index % 1) * this.itemHeight;
171
+ this._scrollDisabled = false;
172
+ }
173
+
174
+ if (this._mayHaveMomentum) {
175
+ // Stop the possible iOS Safari momentum with -webkit-overflow-scrolling: auto;
176
+ this.$.scroller.classList.add('notouchscroll');
177
+ this._mayHaveMomentum = false;
178
+
179
+ setTimeout(() => {
180
+ // Restore -webkit-overflow-scrolling: touch; after a small delay.
181
+ this.$.scroller.classList.remove('notouchscroll');
182
+ }, 10);
183
+ }
184
+ }
185
+
121
186
  /** @protected */
122
187
  ready() {
123
188
  super.ready();
@@ -236,71 +301,6 @@ export class InfiniteScroller extends PolymerElement {
236
301
  });
237
302
  }
238
303
 
239
- /**
240
- * @return {number}
241
- */
242
- get bufferOffset() {
243
- return this._buffers[0].offsetTop;
244
- }
245
-
246
- /**
247
- * @return {number}
248
- */
249
- get position() {
250
- return (this.$.scroller.scrollTop - this._buffers[0].translateY) / this.itemHeight + this._firstIndex;
251
- }
252
-
253
- /**
254
- * Current scroller position as index. Can be a fractional number.
255
- *
256
- * @type {number}
257
- */
258
- set position(index) {
259
- this._preventScrollEvent = true;
260
- if (index > this._firstIndex && index < this._firstIndex + this.bufferSize * 2) {
261
- this.$.scroller.scrollTop = this.itemHeight * (index - this._firstIndex) + this._buffers[0].translateY;
262
- } else {
263
- this._initialIndex = ~~index;
264
- this._reset();
265
- this._scrollDisabled = true;
266
- this.$.scroller.scrollTop += (index % 1) * this.itemHeight;
267
- this._scrollDisabled = false;
268
- }
269
-
270
- if (this._mayHaveMomentum) {
271
- // Stop the possible iOS Safari momentum with -webkit-overflow-scrolling: auto;
272
- this.$.scroller.classList.add('notouchscroll');
273
- this._mayHaveMomentum = false;
274
-
275
- setTimeout(() => {
276
- // Restore -webkit-overflow-scrolling: touch; after a small delay.
277
- this.$.scroller.classList.remove('notouchscroll');
278
- }, 10);
279
- }
280
- }
281
-
282
- /**
283
- * @return {number}
284
- */
285
- get itemHeight() {
286
- if (!this._itemHeightVal) {
287
- const itemHeight = getComputedStyle(this).getPropertyValue('--vaadin-infinite-scroller-item-height');
288
- // Use background-position temp inline style for unit conversion
289
- const tmpStyleProp = 'background-position';
290
- this.$.fullHeight.style.setProperty(tmpStyleProp, itemHeight);
291
- const itemHeightPx = getComputedStyle(this.$.fullHeight).getPropertyValue(tmpStyleProp);
292
- this.$.fullHeight.style.removeProperty(tmpStyleProp);
293
- this._itemHeightVal = parseFloat(itemHeightPx);
294
- }
295
-
296
- return this._itemHeightVal;
297
- }
298
-
299
- /** @private */
300
- get _bufferHeight() {
301
- return this.itemHeight * this.bufferSize;
302
- }
303
-
304
304
  /** @private */
305
305
  _reset() {
306
306
  this._scrollDisabled = true;
@@ -205,18 +205,18 @@ class MonthCalendar extends FocusMixin(ThemableMixin(PolymerElement)) {
205
205
  ];
206
206
  }
207
207
 
208
- /** @protected */
209
- ready() {
210
- super.ready();
211
- addListener(this.$.monthGrid, 'tap', this._handleTap.bind(this));
212
- }
213
-
214
208
  get focusableDateElement() {
215
209
  return [...this.shadowRoot.querySelectorAll('[part~=date]')].find((datePart) => {
216
210
  return dateEquals(datePart.date, this.focusedDate);
217
211
  });
218
212
  }
219
213
 
214
+ /** @protected */
215
+ ready() {
216
+ super.ready();
217
+ addListener(this.$.monthGrid, 'tap', this._handleTap.bind(this));
218
+ }
219
+
220
220
  /* Returns true if all the dates in the month are out of the allowed range */
221
221
  _isDisabled(month, minDate, maxDate) {
222
222
  // First day of the month
@@ -25,7 +25,7 @@ registerStyles(
25
25
 
26
26
  [part='year-separator']::after {
27
27
  color: var(--lumo-disabled-text-color);
28
- content: '';
28
+ content: '\\2022';
29
29
  }
30
30
  `,
31
31
  { moduleId: 'lumo-date-picker-year' },
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "24.0.0-alpha9",
4
+ "version": "24.0.0-alpha12",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -334,7 +334,7 @@
334
334
  },
335
335
  {
336
336
  "name": "vaadin-date-picker",
337
- "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n-----------|--------------------------------------------------|-----------\n`opened` | Set when the date selector overlay is opened | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-date-picker-light>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-date-picker-month-scroller>`\n- `<vaadin-date-picker-year-scroller>`\n- `<vaadin-date-picker-year>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Footer bar with slotted buttons\n\nThe following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n\nAttribute | Description\n----------------|-------------------------------------------------\n`desktop` | Set when the overlay content is in desktop mode\n`fullscreen` | Set when the overlay content is in fullscreen mode\n`years-visible` | Set when the year scroller is visible in fullscreen mode\n\nIn order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`month-header` | Month title\n`weekdays` | Weekday container\n`weekday` | Weekday element\n`week-numbers` | Week numbers container\n`week-number` | Week number element\n`date` | Date element\n`disabled` | Disabled date element\n`focused` | Focused date element\n`selected` | Selected date element\n`today` | Date element corresponding to the current day\n\nIn order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`year-number` | Year number\n`year-separator` | Year separator\n\nNote: the `theme` attribute value set on `<vaadin-date-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
337
+ "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n-----------|--------------------------------------------------|-----------\n`opened` | Set when the date selector overlay is opened | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-date-picker-light>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-date-picker-month-scroller>`\n- `<vaadin-date-picker-year-scroller>`\n- `<vaadin-date-picker-year>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Footer bar with slotted buttons\n\nThe following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n\nAttribute | Description\n----------------|-------------------------------------------------\n`desktop` | Set when the overlay content is in desktop mode\n`fullscreen` | Set when the overlay content is in fullscreen mode\n`years-visible` | Set when the year scroller is visible in fullscreen mode\n\nIn order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`month-header` | Month title\n`weekdays` | Weekday container\n`weekday` | Weekday element\n`week-numbers` | Week numbers container\n`week-number` | Week number element\n`date` | Date element\n`disabled` | Disabled date element\n`focused` | Focused date element\n`selected` | Selected date element\n`today` | Date element corresponding to the current day\n\nIn order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`year-number` | Year number\n`year-separator` | Year separator\n\nNote: the `theme` attribute value set on `<vaadin-date-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
338
338
  "attributes": [
339
339
  {
340
340
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/date-picker",
4
- "version": "24.0.0-alpha9",
4
+ "version": "24.0.0-alpha12",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -156,7 +156,7 @@
156
156
  },
157
157
  {
158
158
  "name": "vaadin-date-picker",
159
- "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n-----------|--------------------------------------------------|-----------\n`opened` | Set when the date selector overlay is opened | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-date-picker-light>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-date-picker-month-scroller>`\n- `<vaadin-date-picker-year-scroller>`\n- `<vaadin-date-picker-year>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha9/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Footer bar with slotted buttons\n\nThe following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n\nAttribute | Description\n----------------|-------------------------------------------------\n`desktop` | Set when the overlay content is in desktop mode\n`fullscreen` | Set when the overlay content is in fullscreen mode\n`years-visible` | Set when the year scroller is visible in fullscreen mode\n\nIn order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`month-header` | Month title\n`weekdays` | Weekday container\n`weekday` | Weekday element\n`week-numbers` | Week numbers container\n`week-number` | Week number element\n`date` | Date element\n`disabled` | Disabled date element\n`focused` | Focused date element\n`selected` | Selected date element\n`today` | Date element corresponding to the current day\n\nIn order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`year-number` | Year number\n`year-separator` | Year separator\n\nNote: the `theme` attribute value set on `<vaadin-date-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
159
+ "description": "`<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n\n```html\n<vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n```\n```js\ndatePicker.value = '2016-03-02';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n-------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n\n`<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------------|--------------------\n`toggle-button` | Toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n-----------|--------------------------------------------------|-----------\n`opened` | Set when the date selector overlay is opened | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-date-picker-light>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-date-picker-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-date-picker-month-scroller>`\n- `<vaadin-date-picker-year-scroller>`\n- `<vaadin-date-picker-year>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-alpha12/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`overlay-header` | Fullscreen mode header\n`label` | Fullscreen mode value/label\n`clear-button` | Fullscreen mode clear button\n`toggle-button` | Fullscreen mode toggle button\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Footer bar with slotted buttons\n\nThe following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n\nAttribute | Description\n----------------|-------------------------------------------------\n`desktop` | Set when the overlay content is in desktop mode\n`fullscreen` | Set when the overlay content is in fullscreen mode\n`years-visible` | Set when the year scroller is visible in fullscreen mode\n\nIn order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`month-header` | Month title\n`weekdays` | Weekday container\n`weekday` | Weekday element\n`week-numbers` | Week numbers container\n`week-number` | Week number element\n`date` | Date element\n`disabled` | Disabled date element\n`focused` | Focused date element\n`selected` | Selected date element\n`today` | Date element corresponding to the current day\n\nIn order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`year-number` | Year number\n`year-separator` | Year separator\n\nNote: the `theme` attribute value set on `<vaadin-date-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
160
160
  "extension": true,
161
161
  "attributes": [
162
162
  {