@vaadin/date-picker 25.0.0-alpha19 → 25.0.0-alpha20
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 +12 -12
- package/src/styles/vaadin-date-picker-base-styles.js +1 -1
- package/src/styles/vaadin-date-picker-overlay-content-base-styles.js +6 -6
- package/src/styles/vaadin-date-picker-year-base-styles.js +2 -2
- package/src/styles/vaadin-month-calendar-base-styles.js +7 -7
- package/src/vaadin-date-picker.d.ts +1 -0
- package/src/vaadin-date-picker.js +4 -3
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-picker",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha20",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,25 +34,25 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
38
|
-
"@vaadin/button": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/field-base": "25.0.0-
|
|
41
|
-
"@vaadin/input-container": "25.0.0-
|
|
42
|
-
"@vaadin/overlay": "25.0.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-alpha20",
|
|
38
|
+
"@vaadin/button": "25.0.0-alpha20",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-alpha20",
|
|
40
|
+
"@vaadin/field-base": "25.0.0-alpha20",
|
|
41
|
+
"@vaadin/input-container": "25.0.0-alpha20",
|
|
42
|
+
"@vaadin/overlay": "25.0.0-alpha20",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha20",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
48
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
47
|
+
"@vaadin/chai-plugins": "25.0.0-alpha20",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha20",
|
|
49
49
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha20",
|
|
51
51
|
"sinon": "^21.0.0"
|
|
52
52
|
},
|
|
53
53
|
"web-types": [
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "c948aae591a30b432f3784000d4677674cae56e0"
|
|
58
58
|
}
|
|
@@ -31,7 +31,7 @@ export const overlayContentStyles = css`
|
|
|
31
31
|
display: inline-flex;
|
|
32
32
|
align-items: center;
|
|
33
33
|
border-radius: var(--vaadin-button-border-radius, var(--vaadin-radius-m));
|
|
34
|
-
color: var(--vaadin-color);
|
|
34
|
+
color: var(--vaadin-text-color);
|
|
35
35
|
font-size: var(--vaadin-button-font-size, inherit);
|
|
36
36
|
font-weight: var(--vaadin-button-font-weight, 500);
|
|
37
37
|
height: var(--vaadin-button-height, auto);
|
|
@@ -41,7 +41,7 @@ export const overlayContentStyles = css`
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
:host([years-visible]) [part='years-toggle-button'] {
|
|
44
|
-
background: var(--vaadin-color);
|
|
44
|
+
background: var(--vaadin-text-color);
|
|
45
45
|
color: var(--vaadin-background-color);
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -57,7 +57,7 @@ export const overlayContentStyles = css`
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
:host([desktop]) ::slotted([slot='months']) {
|
|
60
|
-
border-bottom: 1px solid var(--vaadin-border-color-
|
|
60
|
+
border-bottom: 1px solid var(--vaadin-border-color-secondary);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
::slotted([slot='years']) {
|
|
@@ -66,7 +66,7 @@ export const overlayContentStyles = css`
|
|
|
66
66
|
width: var(--vaadin-date-picker-year-scroller-width, 3rem);
|
|
67
67
|
box-sizing: border-box;
|
|
68
68
|
border-inline-start: 1px solid
|
|
69
|
-
var(--vaadin-date-picker-year-scroller-border-color, var(--vaadin-border-color-
|
|
69
|
+
var(--vaadin-date-picker-year-scroller-border-color, var(--vaadin-border-color-secondary));
|
|
70
70
|
overflow: visible;
|
|
71
71
|
min-height: 0;
|
|
72
72
|
clip-path: inset(0);
|
|
@@ -74,7 +74,7 @@ export const overlayContentStyles = css`
|
|
|
74
74
|
|
|
75
75
|
::slotted([slot='years'])::before {
|
|
76
76
|
background: var(--vaadin-overlay-background, var(--vaadin-background-color));
|
|
77
|
-
border: 1px solid var(--vaadin-date-picker-year-scroller-border-color, var(--vaadin-border-color-
|
|
77
|
+
border: 1px solid var(--vaadin-date-picker-year-scroller-border-color, var(--vaadin-border-color-secondary));
|
|
78
78
|
width: 16px;
|
|
79
79
|
height: 16px;
|
|
80
80
|
position: absolute;
|
|
@@ -103,6 +103,6 @@ export const overlayContentStyles = css`
|
|
|
103
103
|
|
|
104
104
|
:host([fullscreen]) [part='toolbar'] {
|
|
105
105
|
grid-area: header;
|
|
106
|
-
border-bottom: 1px solid var(--vaadin-border-color-
|
|
106
|
+
border-bottom: 1px solid var(--vaadin-border-color-secondary);
|
|
107
107
|
}
|
|
108
108
|
`;
|
|
@@ -18,10 +18,10 @@ export const datePickerYearStyles = css`
|
|
|
18
18
|
height: 50%;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
transform: translateY(-50%);
|
|
21
|
-
color: var(--vaadin-color-
|
|
21
|
+
color: var(--vaadin-text-color-secondary);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
:host([current]) [part='year-number'] {
|
|
25
|
-
color: var(--vaadin-date-picker-year-scroller-current-year-color, var(--vaadin-color));
|
|
25
|
+
color: var(--vaadin-date-picker-year-scroller-current-year-color, var(--vaadin-text-color));
|
|
26
26
|
}
|
|
27
27
|
`;
|
|
@@ -13,7 +13,7 @@ export const monthCalendarStyles = css`
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
[part='month-header'] {
|
|
16
|
-
color: var(--vaadin-date-picker-month-header-color, var(--vaadin-color));
|
|
16
|
+
color: var(--vaadin-date-picker-month-header-color, var(--vaadin-text-color));
|
|
17
17
|
font-size: var(--vaadin-date-picker-month-header-font-size, 0.9375rem);
|
|
18
18
|
font-weight: var(--vaadin-date-picker-month-header-font-weight, 500);
|
|
19
19
|
line-height: inherit;
|
|
@@ -33,7 +33,7 @@ export const monthCalendarStyles = css`
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
[part~='weekday'] {
|
|
36
|
-
color: var(--vaadin-date-picker-weekday-color, var(--vaadin-color-
|
|
36
|
+
color: var(--vaadin-date-picker-weekday-color, var(--vaadin-text-color-secondary));
|
|
37
37
|
font-size: var(--vaadin-date-picker-weekday-font-size, 0.75rem);
|
|
38
38
|
font-weight: var(--vaadin-date-picker-weekday-font-weight, 500);
|
|
39
39
|
margin-bottom: 0.375rem;
|
|
@@ -46,7 +46,7 @@ export const monthCalendarStyles = css`
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
[part~='week-number'] {
|
|
49
|
-
color: var(--vaadin-date-picker-week-number-color, var(--vaadin-color-
|
|
49
|
+
color: var(--vaadin-date-picker-week-number-color, var(--vaadin-text-color-secondary));
|
|
50
50
|
font-size: var(--vaadin-date-picker-week-number-font-size, 0.7rem);
|
|
51
51
|
line-height: 1;
|
|
52
52
|
width: 100%;
|
|
@@ -61,7 +61,7 @@ export const monthCalendarStyles = css`
|
|
|
61
61
|
flex: 1;
|
|
62
62
|
background: var(
|
|
63
63
|
--vaadin-date-picker-week-divider-color,
|
|
64
|
-
var(--vaadin-divider-color, var(--vaadin-border-color-
|
|
64
|
+
var(--vaadin-divider-color, var(--vaadin-border-color-secondary))
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -98,7 +98,7 @@ export const monthCalendarStyles = css`
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
[part~='today'] {
|
|
101
|
-
color: var(--vaadin-date-picker-date-today-color, var(--vaadin-color));
|
|
101
|
+
color: var(--vaadin-date-picker-date-today-color, var(--vaadin-text-color));
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
[part~='selected'] {
|
|
@@ -106,13 +106,13 @@ export const monthCalendarStyles = css`
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
[part~='selected']::after {
|
|
109
|
-
background: var(--vaadin-date-picker-date-selected-background, var(--vaadin-color));
|
|
109
|
+
background: var(--vaadin-date-picker-date-selected-background, var(--vaadin-text-color));
|
|
110
110
|
outline-offset: 1px;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
[disabled] {
|
|
114
114
|
cursor: var(--vaadin-disabled-cursor);
|
|
115
|
-
color: var(--vaadin-date-picker-date-disabled-color, var(--vaadin-color-disabled));
|
|
115
|
+
color: var(--vaadin-date-picker-date-disabled-color, var(--vaadin-text-color-disabled));
|
|
116
116
|
opacity: 0.7;
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -84,6 +84,7 @@ export interface DatePickerEventMap extends HTMLElementEventMap, DatePickerCusto
|
|
|
84
84
|
* ---------------------|----------------
|
|
85
85
|
* `label` | The label element
|
|
86
86
|
* `input-field` | The element that wraps prefix, value and buttons
|
|
87
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
87
88
|
* `clear-button` | The clear button
|
|
88
89
|
* `error-message` | The error message element
|
|
89
90
|
* `helper-text` | The helper text element wrapper
|
|
@@ -48,6 +48,7 @@ import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
|
48
48
|
* ---------------------|----------------
|
|
49
49
|
* `label` | The label element
|
|
50
50
|
* `input-field` | The element that wraps prefix, value and buttons
|
|
51
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
51
52
|
* `clear-button` | The clear button
|
|
52
53
|
* `error-message` | The error message element
|
|
53
54
|
* `helper-text` | The helper text element wrapper
|
|
@@ -204,8 +205,8 @@ class DatePicker extends DatePickerMixin(
|
|
|
204
205
|
>
|
|
205
206
|
<slot name="prefix" slot="prefix"></slot>
|
|
206
207
|
<slot name="input"></slot>
|
|
207
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
208
|
-
<div part="toggle-button" slot="suffix" aria-hidden="true" @click="${this._toggle}"></div>
|
|
208
|
+
<div id="clearButton" part="field-button clear-button" slot="suffix" aria-hidden="true"></div>
|
|
209
|
+
<div part="field-button toggle-button" slot="suffix" aria-hidden="true" @click="${this._toggle}"></div>
|
|
209
210
|
</vaadin-input-container>
|
|
210
211
|
|
|
211
212
|
<div part="helper-text">
|
|
@@ -272,7 +273,7 @@ class DatePicker extends DatePickerMixin(
|
|
|
272
273
|
|
|
273
274
|
this._positionTarget = this.shadowRoot.querySelector('[part="input-field"]');
|
|
274
275
|
|
|
275
|
-
const toggleButton = this.shadowRoot.querySelector('[part="toggle-button"]');
|
|
276
|
+
const toggleButton = this.shadowRoot.querySelector('[part="field-button toggle-button"]');
|
|
276
277
|
toggleButton.addEventListener('mousedown', (e) => e.preventDefault());
|
|
277
278
|
}
|
|
278
279
|
|
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-picker",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha20",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-date-picker",
|
|
11
|
-
"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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\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`opened` | Set when the overlay is opened\n`week-numbers` | Set when week numbers are shown in the calendar\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\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\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Toolbar 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`past` | Date element corresponding to the date in the past\n`future` | Date element corresponding to the date in the future\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\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",
|
|
11
|
+
"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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\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`opened` | Set when the overlay is opened\n`week-numbers` | Set when week numbers are shown in the calendar\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\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\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Toolbar 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`past` | Date element corresponding to the date in the past\n`future` | Date element corresponding to the date in the future\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\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",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
package/web-types.lit.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": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha20",
|
|
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-picker",
|
|
19
|
-
"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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\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`opened` | Set when the overlay is opened\n`week-numbers` | Set when week numbers are shown in the calendar\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\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\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Toolbar 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`past` | Date element corresponding to the date in the past\n`future` | Date element corresponding to the date in the future\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\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",
|
|
19
|
+
"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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`backdrop` | Backdrop of the overlay\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\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`opened` | Set when the overlay is opened\n`week-numbers` | Set when week numbers are shown in the calendar\n\n### Internal components\n\nIn addition to `<vaadin-date-picker>` itself, the following internal\ncomponents are themable:\n\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\nIn order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n\nPart name | Description\n----------------------|--------------------\n`years-toggle-button` | Fullscreen mode years scroller toggle\n`toolbar` | Toolbar 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`past` | Date element corresponding to the date in the past\n`future` | Date element corresponding to the date in the future\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\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",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|