@vaadin/vaadin-date-picker 22.0.0-alpha6 → 22.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/LICENSE +1 -1
- package/package.json +23 -38
- package/src/vaadin-date-picker-light.d.ts +13 -73
- package/src/vaadin-date-picker-light.js +4 -147
- package/src/vaadin-date-picker.d.ts +13 -152
- package/src/vaadin-date-picker.js +4 -336
- package/theme/lumo/vaadin-date-picker-light.js +1 -4
- package/theme/lumo/vaadin-date-picker.js +1 -6
- package/theme/material/vaadin-date-picker-light.js +1 -4
- package/theme/material/vaadin-date-picker.js +1 -6
- package/vaadin-date-picker.d.ts +0 -1
- package/src/interfaces.d.ts +0 -45
- package/src/vaadin-date-picker-helper.d.ts +0 -43
- package/src/vaadin-date-picker-helper.js +0 -105
- package/src/vaadin-date-picker-mixin.d.ts +0 -221
- package/src/vaadin-date-picker-mixin.js +0 -1059
- package/src/vaadin-date-picker-overlay-content.js +0 -932
- package/src/vaadin-date-picker-overlay.js +0 -21
- package/src/vaadin-date-picker-styles.js +0 -42
- package/src/vaadin-date-picker-text-field.js +0 -41
- package/src/vaadin-infinite-scroller.js +0 -358
- package/src/vaadin-month-calendar.js +0 -370
- package/theme/lumo/vaadin-date-picker-overlay-content-styles.js +0 -215
- package/theme/lumo/vaadin-date-picker-overlay-styles.js +0 -50
- package/theme/lumo/vaadin-date-picker-styles.js +0 -25
- package/theme/lumo/vaadin-date-picker-text-field-styles.js +0 -18
- package/theme/lumo/vaadin-date-picker-text-field.js +0 -2
- package/theme/lumo/vaadin-month-calendar-styles.js +0 -163
- package/theme/material/vaadin-date-picker-overlay-content-styles.js +0 -176
- package/theme/material/vaadin-date-picker-overlay-styles.js +0 -44
- package/theme/material/vaadin-date-picker-styles.js +0 -21
- package/theme/material/vaadin-date-picker-text-field.js +0 -2
- package/theme/material/vaadin-month-calendar-styles.js +0 -120
package/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -1,52 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-date-picker",
|
|
3
|
-
"version": "22.0.0-
|
|
3
|
+
"version": "22.0.0-beta1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
4
7
|
"description": "Web component providing a date selection field with scrollable month calendar",
|
|
8
|
+
"license": "Apache-2.0",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/vaadin/web-components.git",
|
|
12
|
+
"directory": "packages/vaadin-date-picker"
|
|
13
|
+
},
|
|
14
|
+
"author": "Vaadin Ltd",
|
|
15
|
+
"homepage": "https://vaadin.com/components",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/vaadin/vaadin-date-picker/issues"
|
|
18
|
+
},
|
|
5
19
|
"main": "vaadin-date-picker.js",
|
|
6
20
|
"module": "vaadin-date-picker.js",
|
|
7
|
-
"
|
|
21
|
+
"files": [
|
|
22
|
+
"src",
|
|
23
|
+
"theme",
|
|
24
|
+
"vaadin-*.d.ts",
|
|
25
|
+
"vaadin-*.js"
|
|
26
|
+
],
|
|
8
27
|
"keywords": [
|
|
9
28
|
"Vaadin",
|
|
10
29
|
"date-picker",
|
|
11
30
|
"web-components",
|
|
12
31
|
"web-component"
|
|
13
32
|
],
|
|
14
|
-
"author": "Vaadin Ltd",
|
|
15
|
-
"license": "Apache-2.0",
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/vaadin/vaadin-date-picker/issues"
|
|
18
|
-
},
|
|
19
|
-
"homepage": "https://vaadin.com/components",
|
|
20
|
-
"files": [
|
|
21
|
-
"vaadin-*.d.ts",
|
|
22
|
-
"vaadin-*.js",
|
|
23
|
-
"src",
|
|
24
|
-
"theme"
|
|
25
|
-
],
|
|
26
33
|
"dependencies": {
|
|
27
|
-
"@
|
|
28
|
-
"@polymer/iron-a11y-keys-behavior": "^3.0.0",
|
|
29
|
-
"@polymer/iron-media-query": "^3.0.0",
|
|
30
|
-
"@polymer/iron-resizable-behavior": "^3.0.0",
|
|
31
|
-
"@polymer/polymer": "^3.2.0",
|
|
32
|
-
"@vaadin/button": "^22.0.0-alpha6",
|
|
33
|
-
"@vaadin/vaadin-control-state-mixin": "^22.0.0-alpha6",
|
|
34
|
-
"@vaadin/vaadin-element-mixin": "^22.0.0-alpha6",
|
|
35
|
-
"@vaadin/vaadin-lumo-styles": "^22.0.0-alpha6",
|
|
36
|
-
"@vaadin/vaadin-material-styles": "^22.0.0-alpha6",
|
|
37
|
-
"@vaadin/vaadin-overlay": "^22.0.0-alpha6",
|
|
38
|
-
"@vaadin/vaadin-text-field": "^22.0.0-alpha6",
|
|
39
|
-
"@vaadin/vaadin-themable-mixin": "^22.0.0-alpha6"
|
|
40
|
-
},
|
|
41
|
-
"devDependencies": {
|
|
42
|
-
"@esm-bundle/chai": "^4.3.4",
|
|
43
|
-
"@vaadin/testing-helpers": "^0.3.0",
|
|
44
|
-
"@vaadin/vaadin-dialog": "^22.0.0-alpha6",
|
|
45
|
-
"@vaadin/vaadin-template-renderer": "^22.0.0-alpha6",
|
|
46
|
-
"sinon": "^9.2.0"
|
|
47
|
-
},
|
|
48
|
-
"publishConfig": {
|
|
49
|
-
"access": "public"
|
|
34
|
+
"@vaadin/date-picker": "22.0.0-beta1"
|
|
50
35
|
},
|
|
51
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e"
|
|
52
37
|
}
|
|
@@ -1,78 +1,18 @@
|
|
|
1
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
2
|
-
|
|
3
|
-
import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
4
|
-
|
|
5
|
-
import { DatePickerEventMap } from './interfaces';
|
|
6
|
-
|
|
7
1
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* To create a custom input field, you need to add a child element which has a two-way
|
|
12
|
-
* data-bindable property representing the input value. The property name is expected
|
|
13
|
-
* to be `bindValue` by default. See the example below for a simplest possible example
|
|
14
|
-
* using an `<input>` element.
|
|
15
|
-
*
|
|
16
|
-
* ```html
|
|
17
|
-
* <vaadin-date-picker-light attr-for-value="value">
|
|
18
|
-
* <input class="input">
|
|
19
|
-
* </vaadin-date-picker-light>
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* ### Styling
|
|
23
|
-
*
|
|
24
|
-
* The following shadow DOM parts are available for styling:
|
|
25
|
-
*
|
|
26
|
-
* Part name | Description | Theme for Element
|
|
27
|
-
* ----------------|----------------|----------------
|
|
28
|
-
* `overlay-content` | The overlay element | vaadin-date-picker-light
|
|
29
|
-
*
|
|
30
|
-
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
|
|
31
|
-
*
|
|
32
|
-
* In addition to `<vaadin-date-picker-light>` itself, the following
|
|
33
|
-
* internal components are themable:
|
|
34
|
-
*
|
|
35
|
-
* - `<vaadin-date-picker-overlay>`
|
|
36
|
-
* - `<vaadin-date-picker-overlay-content>`
|
|
37
|
-
* - `<vaadin-month-calendar>`
|
|
38
|
-
*
|
|
39
|
-
* Note: the `theme` attribute value set on `<vaadin-date-picker-light>`
|
|
40
|
-
* is propagated to the internal themable components listed above.
|
|
41
|
-
*
|
|
42
|
-
* @fires {Event} change - Fired when the user commits a value change.
|
|
43
|
-
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
44
|
-
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
45
5
|
*/
|
|
46
|
-
|
|
47
|
-
_overlayInitialized: boolean;
|
|
48
|
-
|
|
49
|
-
_inputValue: string | undefined;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Name of the two-way data-bindable property representing the
|
|
53
|
-
* value of the custom input field.
|
|
54
|
-
*/
|
|
55
|
-
attrForValue: string;
|
|
56
|
-
|
|
57
|
-
_input(): HTMLElement | null;
|
|
6
|
+
import { DatePickerLight } from '@vaadin/date-picker/src/vaadin-date-picker-light.js';
|
|
58
7
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
): void;
|
|
64
|
-
|
|
65
|
-
removeEventListener<K extends keyof DatePickerEventMap>(
|
|
66
|
-
type: K,
|
|
67
|
-
listener: (this: DatePickerLightElement, ev: DatePickerEventMap[K]) => void,
|
|
68
|
-
options?: boolean | EventListenerOptions
|
|
69
|
-
): void;
|
|
70
|
-
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Import `DatePickerLight` from `@vaadin/date-picker` instead.
|
|
10
|
+
*/
|
|
11
|
+
export type DatePickerLightElement = DatePickerLight;
|
|
71
12
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Import `DatePickerLight` from `@vaadin/date-picker` instead.
|
|
15
|
+
*/
|
|
16
|
+
export const DatePickerLightElement: typeof DatePickerLight;
|
|
77
17
|
|
|
78
|
-
export
|
|
18
|
+
export * from '@vaadin/date-picker/src/vaadin-date-picker-light.js';
|
|
@@ -3,154 +3,11 @@
|
|
|
3
3
|
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { dashToCamelCase } from '@polymer/polymer/lib/utils/case-map.js';
|
|
8
|
-
import '@polymer/iron-media-query/iron-media-query.js';
|
|
9
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
|
-
import './vaadin-date-picker-overlay.js';
|
|
11
|
-
import './vaadin-date-picker-overlay-content.js';
|
|
12
|
-
import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
6
|
+
import { DatePickerLight } from '@vaadin/date-picker/src/vaadin-date-picker-light.js';
|
|
13
7
|
|
|
14
8
|
/**
|
|
15
|
-
*
|
|
16
|
-
* only the scrollable month calendar view and leaving the input field definition to the user.
|
|
17
|
-
*
|
|
18
|
-
* To create a custom input field, you need to add a child element which has a two-way
|
|
19
|
-
* data-bindable property representing the input value. The property name is expected
|
|
20
|
-
* to be `bindValue` by default. See the example below for a simplest possible example
|
|
21
|
-
* using an `<input>` element.
|
|
22
|
-
*
|
|
23
|
-
* ```html
|
|
24
|
-
* <vaadin-date-picker-light attr-for-value="value">
|
|
25
|
-
* <input class="input">
|
|
26
|
-
* </vaadin-date-picker-light>
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* ### Styling
|
|
30
|
-
*
|
|
31
|
-
* The following shadow DOM parts are available for styling:
|
|
32
|
-
*
|
|
33
|
-
* Part name | Description | Theme for Element
|
|
34
|
-
* ----------------|----------------|----------------
|
|
35
|
-
* `overlay-content` | The overlay element | vaadin-date-picker-light
|
|
36
|
-
*
|
|
37
|
-
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
|
|
38
|
-
*
|
|
39
|
-
* In addition to `<vaadin-date-picker-light>` itself, the following
|
|
40
|
-
* internal components are themable:
|
|
41
|
-
*
|
|
42
|
-
* - `<vaadin-date-picker-overlay>`
|
|
43
|
-
* - `<vaadin-date-picker-overlay-content>`
|
|
44
|
-
* - `<vaadin-month-calendar>`
|
|
45
|
-
*
|
|
46
|
-
* Note: the `theme` attribute value set on `<vaadin-date-picker-light>`
|
|
47
|
-
* is propagated to the internal themable components listed above.
|
|
48
|
-
*
|
|
49
|
-
* @fires {Event} change - Fired when the user commits a value change.
|
|
50
|
-
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
51
|
-
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
52
|
-
*
|
|
53
|
-
* @extends HTMLElement
|
|
54
|
-
* @mixes ThemableMixin
|
|
55
|
-
* @mixes DatePickerMixin
|
|
9
|
+
* @deprecated Import `DatePickerLight` from `@vaadin/date-picker` instead.
|
|
56
10
|
*/
|
|
57
|
-
|
|
58
|
-
static get template() {
|
|
59
|
-
return html`
|
|
60
|
-
<style>
|
|
61
|
-
:host {
|
|
62
|
-
display: inline-block;
|
|
63
|
-
}
|
|
11
|
+
export const DatePickerLightElement = DatePickerLight;
|
|
64
12
|
|
|
65
|
-
|
|
66
|
-
pointer-events: auto;
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
69
|
-
<slot></slot>
|
|
70
|
-
|
|
71
|
-
<vaadin-date-picker-overlay
|
|
72
|
-
id="overlay"
|
|
73
|
-
fullscreen$="[[_fullscreen]]"
|
|
74
|
-
opened="{{opened}}"
|
|
75
|
-
on-vaadin-overlay-open="_onOverlayOpened"
|
|
76
|
-
on-vaadin-overlay-close="_onOverlayClosed"
|
|
77
|
-
theme$="[[__getOverlayTheme(theme, _overlayInitialized)]]"
|
|
78
|
-
>
|
|
79
|
-
<template>
|
|
80
|
-
<vaadin-date-picker-overlay-content
|
|
81
|
-
id="overlay-content"
|
|
82
|
-
i18n="[[i18n]]"
|
|
83
|
-
fullscreen$="[[_fullscreen]]"
|
|
84
|
-
label="[[label]]"
|
|
85
|
-
selected-date="{{_selectedDate}}"
|
|
86
|
-
slot="dropdown-content"
|
|
87
|
-
focused-date="{{_focusedDate}}"
|
|
88
|
-
show-week-numbers="[[showWeekNumbers]]"
|
|
89
|
-
min-date="[[_minDate]]"
|
|
90
|
-
max-date="[[_maxDate]]"
|
|
91
|
-
on-date-tap="_close"
|
|
92
|
-
role="dialog"
|
|
93
|
-
part="overlay-content"
|
|
94
|
-
theme$="[[__getOverlayTheme(theme, _overlayInitialized)]]"
|
|
95
|
-
>
|
|
96
|
-
</vaadin-date-picker-overlay-content>
|
|
97
|
-
</template>
|
|
98
|
-
</vaadin-date-picker-overlay>
|
|
99
|
-
|
|
100
|
-
<iron-media-query query="[[_fullscreenMediaQuery]]" query-matches="{{_fullscreen}}"> </iron-media-query>
|
|
101
|
-
`;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
static get is() {
|
|
105
|
-
return 'vaadin-date-picker-light';
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
static get properties() {
|
|
109
|
-
return {
|
|
110
|
-
/**
|
|
111
|
-
* Name of the two-way data-bindable property representing the
|
|
112
|
-
* value of the custom input field.
|
|
113
|
-
* @attr {string} attr-for-value
|
|
114
|
-
* @type {string}
|
|
115
|
-
*/
|
|
116
|
-
attrForValue: {
|
|
117
|
-
type: String,
|
|
118
|
-
value: 'bind-value'
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @type {boolean}
|
|
123
|
-
* @protected
|
|
124
|
-
*/
|
|
125
|
-
_overlayInitialized: {
|
|
126
|
-
type: Boolean,
|
|
127
|
-
value: true
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @return {HTMLElement}
|
|
134
|
-
* @protected
|
|
135
|
-
*/
|
|
136
|
-
_input() {
|
|
137
|
-
// Using the same selector than in combo-box.
|
|
138
|
-
// TODO: revisit this to decide the selector and document conveniently.
|
|
139
|
-
return this.querySelector('vaadin-text-field,iron-input,paper-input,.paper-input-input,.input');
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
set _inputValue(value) {
|
|
143
|
-
if (this._inputElement) {
|
|
144
|
-
this._inputElement[dashToCamelCase(this.attrForValue)] = value;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/** @return {string | undefined} */
|
|
149
|
-
get _inputValue() {
|
|
150
|
-
return this._inputElement && this._inputElement[dashToCamelCase(this.attrForValue)];
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
customElements.define(DatePickerLightElement.is, DatePickerLightElement);
|
|
155
|
-
|
|
156
|
-
export { DatePickerLightElement };
|
|
13
|
+
export * from '@vaadin/date-picker/src/vaadin-date-picker-light.js';
|
|
@@ -1,157 +1,18 @@
|
|
|
1
|
-
import { GestureEventListeners } from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
|
|
2
|
-
|
|
3
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
4
|
-
|
|
5
|
-
import { ControlStateMixin } from '@vaadin/vaadin-control-state-mixin/vaadin-control-state-mixin.js';
|
|
6
|
-
|
|
7
|
-
import { DatePickerMixin } from './vaadin-date-picker-mixin.js';
|
|
8
|
-
|
|
9
|
-
import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js';
|
|
10
|
-
|
|
11
|
-
import { DatePickerEventMap } from './interfaces';
|
|
12
|
-
|
|
13
1
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* <vaadin-date-picker label="Birthday"></vaadin-date-picker>
|
|
18
|
-
* ```
|
|
19
|
-
* ```js
|
|
20
|
-
* datePicker.value = '2016-03-02';
|
|
21
|
-
* ```
|
|
22
|
-
* When the selected `value` is changed, a `value-changed` event is triggered.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* ### Styling
|
|
26
|
-
*
|
|
27
|
-
* The following shadow DOM parts are available for styling:
|
|
28
|
-
*
|
|
29
|
-
* Part name | Description | Theme for Element
|
|
30
|
-
* ----------------|----------------|----------------
|
|
31
|
-
* `text-field` | Input element | vaadin-date-picker
|
|
32
|
-
* `clear-button` | Clear button | vaadin-date-picker
|
|
33
|
-
* `toggle-button` | Toggle button | vaadin-date-picker
|
|
34
|
-
* `overlay-content` | The overlay element | vaadin-date-picker
|
|
35
|
-
* `overlay-header` | Fullscreen mode header | vaadin-date-picker-overlay-content
|
|
36
|
-
* `label` | Fullscreen mode value/label | vaadin-date-picker-overlay-content
|
|
37
|
-
* `clear-button` | Fullscreen mode clear button | vaadin-date-picker-overlay-content
|
|
38
|
-
* `toggle-button` | Fullscreen mode toggle button | vaadin-date-picker-overlay-content
|
|
39
|
-
* `years-toggle-button` | Fullscreen mode years scroller toggle | vaadin-date-picker-overlay-content
|
|
40
|
-
* `months` | Months scroller | vaadin-date-picker-overlay-content
|
|
41
|
-
* `years` | Years scroller | vaadin-date-picker-overlay-content
|
|
42
|
-
* `toolbar` | Footer bar with buttons | vaadin-date-picker-overlay-content
|
|
43
|
-
* `today-button` | Today button | vaadin-date-picker-overlay-content
|
|
44
|
-
* `cancel-button` | Cancel button | vaadin-date-picker-overlay-content
|
|
45
|
-
* `month` | Month calendar | vaadin-date-picker-overlay-content
|
|
46
|
-
* `year-number` | Year number | vaadin-date-picker-overlay-content
|
|
47
|
-
* `year-separator` | Year separator | vaadin-date-picker-overlay-content
|
|
48
|
-
* `month-header` | Month title | vaadin-month-calendar
|
|
49
|
-
* `weekdays` | Weekday container | vaadin-month-calendar
|
|
50
|
-
* `weekday` | Weekday element | vaadin-month-calendar
|
|
51
|
-
* `week-numbers` | Week numbers container | vaadin-month-calendar
|
|
52
|
-
* `week-number` | Week number element | vaadin-month-calendar
|
|
53
|
-
* `date` | Date element | vaadin-month-calendar
|
|
54
|
-
*
|
|
55
|
-
* See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation.
|
|
56
|
-
*
|
|
57
|
-
* The following state attributes are available for styling:
|
|
58
|
-
*
|
|
59
|
-
* Attribute | Description | Part name
|
|
60
|
-
* -------------|-------------|------------
|
|
61
|
-
* `invalid` | Set when the element is invalid | :host
|
|
62
|
-
* `opened` | Set when the date selector overlay is opened | :host
|
|
63
|
-
* `readonly` | Set when the element is readonly | :host
|
|
64
|
-
* `disabled` | Set when the element is disabled | :host
|
|
65
|
-
* `today` | Set on the date corresponding to the current day | date
|
|
66
|
-
* `focused` | Set on the focused date | date
|
|
67
|
-
* `disabled` | Set on the date out of the allowed range | date
|
|
68
|
-
* `selected` | Set on the selected date | date
|
|
69
|
-
*
|
|
70
|
-
* If you want to replace the default input field with a custom implementation, you should use the
|
|
71
|
-
* [`<vaadin-date-picker-light>`](#vaadin-date-picker-light) element.
|
|
72
|
-
*
|
|
73
|
-
* ### Internal components
|
|
74
|
-
*
|
|
75
|
-
* In addition to `<vaadin-date-picker>` itself, the following internal
|
|
76
|
-
* components are themable:
|
|
77
|
-
*
|
|
78
|
-
* - `<vaadin-date-picker-text-field>` - has the same API as [`<vaadin-text-field>`](#/elements/vaadin-text-field).
|
|
79
|
-
* - `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](#/elements/vaadin-overlay).
|
|
80
|
-
* - `<vaadin-date-picker-overlay-content>`
|
|
81
|
-
* - `<vaadin-month-calendar>`
|
|
82
|
-
*
|
|
83
|
-
* Note: the `theme` attribute value set on `<vaadin-date-picker>` is
|
|
84
|
-
* propagated to the internal components listed above.
|
|
85
|
-
*
|
|
86
|
-
* @fires {Event} change - Fired when the user commits a value change.
|
|
87
|
-
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
88
|
-
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
89
|
-
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
90
5
|
*/
|
|
91
|
-
|
|
92
|
-
ControlStateMixin(ThemableMixin(DatePickerMixin(GestureEventListeners(HTMLElement))))
|
|
93
|
-
) {
|
|
94
|
-
/**
|
|
95
|
-
* Focusable element used by vaadin-control-state-mixin
|
|
96
|
-
*/
|
|
97
|
-
readonly focusElement: HTMLElement;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Set to true to disable this element.
|
|
101
|
-
*/
|
|
102
|
-
disabled: boolean;
|
|
103
|
-
|
|
104
|
-
_inputValue: string;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Set to true to display the clear icon which clears the input.
|
|
108
|
-
*/
|
|
109
|
-
clearButtonVisible: boolean;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* The error message to display when the input is invalid.
|
|
113
|
-
*/
|
|
114
|
-
errorMessage: string | null | undefined;
|
|
6
|
+
import { DatePicker } from '@vaadin/date-picker/src/vaadin-date-picker.js';
|
|
115
7
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* String used for the helper text.
|
|
123
|
-
*/
|
|
124
|
-
helperText: string | null | undefined;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Set to true to make this element read-only.
|
|
128
|
-
*/
|
|
129
|
-
readonly: boolean;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* This property is set to true when the control value invalid.
|
|
133
|
-
*/
|
|
134
|
-
invalid: boolean;
|
|
135
|
-
|
|
136
|
-
_input(): HTMLElement | null;
|
|
137
|
-
|
|
138
|
-
addEventListener<K extends keyof DatePickerEventMap>(
|
|
139
|
-
type: K,
|
|
140
|
-
listener: (this: DatePickerElement, ev: DatePickerEventMap[K]) => void,
|
|
141
|
-
options?: boolean | AddEventListenerOptions
|
|
142
|
-
): void;
|
|
143
|
-
|
|
144
|
-
removeEventListener<K extends keyof DatePickerEventMap>(
|
|
145
|
-
type: K,
|
|
146
|
-
listener: (this: DatePickerElement, ev: DatePickerEventMap[K]) => void,
|
|
147
|
-
options?: boolean | EventListenerOptions
|
|
148
|
-
): void;
|
|
149
|
-
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Import `DatePicker` from `@vaadin/date-picker` instead.
|
|
10
|
+
*/
|
|
11
|
+
export type DatePickerElement = DatePicker;
|
|
150
12
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Import `DatePicker` from `@vaadin/date-picker` instead.
|
|
15
|
+
*/
|
|
16
|
+
export const DatePickerElement: typeof DatePicker;
|
|
156
17
|
|
|
157
|
-
export
|
|
18
|
+
export * from '@vaadin/date-picker/src/vaadin-date-picker.js';
|