@vaadin/date-picker 23.2.4 → 23.2.6
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 +10 -10
- package/src/vaadin-date-picker-overlay-content.js +70 -20
- package/src/vaadin-date-picker-styles.js +0 -5
- package/src/vaadin-infinite-scroller.js +41 -10
- package/src/vaadin-month-calendar.js +0 -6
- package/theme/lumo/vaadin-date-picker-overlay-content-styles.js +2 -2
- package/theme/material/vaadin-date-picker-overlay-content-styles.js +0 -5
- 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": "23.2.
|
|
3
|
+
"version": "23.2.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.2.0",
|
|
39
|
-
"@vaadin/button": "~23.2.
|
|
40
|
-
"@vaadin/component-base": "~23.2.
|
|
41
|
-
"@vaadin/field-base": "~23.2.
|
|
42
|
-
"@vaadin/input-container": "~23.2.
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "~23.2.
|
|
44
|
-
"@vaadin/vaadin-material-styles": "~23.2.
|
|
45
|
-
"@vaadin/vaadin-overlay": "~23.2.
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "~23.2.
|
|
39
|
+
"@vaadin/button": "~23.2.6",
|
|
40
|
+
"@vaadin/component-base": "~23.2.6",
|
|
41
|
+
"@vaadin/field-base": "~23.2.6",
|
|
42
|
+
"@vaadin/input-container": "~23.2.6",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "~23.2.6",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "~23.2.6",
|
|
45
|
+
"@vaadin/vaadin-overlay": "~23.2.6",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "~23.2.6"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "3925f404e88c6574ca49058d1cd6b27558a5482b"
|
|
58
58
|
}
|
|
@@ -297,6 +297,18 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
|
|
|
297
297
|
return this.getAttribute('dir') === 'rtl';
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
+
/**
|
|
301
|
+
* Whether to scroll to a sub-month position when scrolling to a date.
|
|
302
|
+
* This is active if the month scroller is not large enough to fit a
|
|
303
|
+
* full month. In that case we want to scroll to a position between
|
|
304
|
+
* two months in order to have the focused date in the visible area.
|
|
305
|
+
* @returns {boolean} whether to use sub-month scrolling
|
|
306
|
+
* @private
|
|
307
|
+
*/
|
|
308
|
+
get __useSubMonthScrolling() {
|
|
309
|
+
return this.$.monthScroller.clientHeight < this.$.monthScroller.itemHeight + this.$.monthScroller.bufferOffset;
|
|
310
|
+
}
|
|
311
|
+
|
|
300
312
|
get calendars() {
|
|
301
313
|
return [...this.shadowRoot.querySelectorAll('vaadin-month-calendar')];
|
|
302
314
|
}
|
|
@@ -354,7 +366,9 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
|
|
|
354
366
|
* Scrolls the list to the given Date.
|
|
355
367
|
*/
|
|
356
368
|
scrollToDate(date, animate) {
|
|
357
|
-
this.
|
|
369
|
+
const offset = this.__useSubMonthScrolling ? this._calculateWeekScrollOffset(date) : 0;
|
|
370
|
+
this._scrollToPosition(this._differenceInMonths(date, this._originDate) + offset, animate);
|
|
371
|
+
this.$.monthScroller.forceUpdate();
|
|
358
372
|
}
|
|
359
373
|
|
|
360
374
|
/**
|
|
@@ -386,23 +400,63 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
|
|
|
386
400
|
* Scrolls the month and year scrollers enough to reveal the given date.
|
|
387
401
|
*/
|
|
388
402
|
revealDate(date, animate = true) {
|
|
389
|
-
if (date) {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
);
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
403
|
+
if (!date) {
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
const diff = this._differenceInMonths(date, this._originDate);
|
|
407
|
+
// If scroll area does not fit the full month, then always scroll with an offset to
|
|
408
|
+
// approximately display the week of the date
|
|
409
|
+
if (this.__useSubMonthScrolling) {
|
|
410
|
+
const offset = this._calculateWeekScrollOffset(date);
|
|
411
|
+
this._scrollToPosition(diff + offset, animate);
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// Otherwise determine if we need to scroll to make the month of the date visible
|
|
416
|
+
const scrolledAboveViewport = this.$.monthScroller.position > diff;
|
|
417
|
+
|
|
418
|
+
const visibleArea = Math.max(
|
|
419
|
+
this.$.monthScroller.itemHeight,
|
|
420
|
+
this.$.monthScroller.clientHeight - this.$.monthScroller.bufferOffset * 2,
|
|
421
|
+
);
|
|
422
|
+
const visibleItems = visibleArea / this.$.monthScroller.itemHeight;
|
|
423
|
+
const scrolledBelowViewport = this.$.monthScroller.position + visibleItems - 1 < diff;
|
|
424
|
+
|
|
425
|
+
if (scrolledAboveViewport) {
|
|
426
|
+
this._scrollToPosition(diff, animate);
|
|
427
|
+
} else if (scrolledBelowViewport) {
|
|
428
|
+
this._scrollToPosition(diff - visibleItems + 1, animate);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Calculates an offset to be added to the month scroll position
|
|
434
|
+
* when using sub-month scrolling, in order ensure that the week
|
|
435
|
+
* that the date is in is visible even for small scroll areas.
|
|
436
|
+
* As the month scroller uses a month as minimal scroll unit
|
|
437
|
+
* (a value of `1` equals one month), we can not exactly identify
|
|
438
|
+
* the position of a specific week. This is a best effort
|
|
439
|
+
* implementation based on manual testing.
|
|
440
|
+
* @param date the date for which to calculate the offset
|
|
441
|
+
* @returns {number} the offset
|
|
442
|
+
* @private
|
|
443
|
+
*/
|
|
444
|
+
_calculateWeekScrollOffset(date) {
|
|
445
|
+
// Get first day of month
|
|
446
|
+
const temp = new Date(0, 0);
|
|
447
|
+
temp.setFullYear(date.getFullYear());
|
|
448
|
+
temp.setMonth(date.getMonth());
|
|
449
|
+
temp.setDate(1);
|
|
450
|
+
// Determine week (=row index) of date within the month
|
|
451
|
+
let week = 0;
|
|
452
|
+
while (temp.getDate() < date.getDate()) {
|
|
453
|
+
temp.setDate(temp.getDate() + 1);
|
|
454
|
+
if (temp.getDay() === this.i18n.firstDayOfWeek) {
|
|
455
|
+
week += 1;
|
|
404
456
|
}
|
|
405
457
|
}
|
|
458
|
+
// Calculate magic number that approximately keeps the week visible
|
|
459
|
+
return week / 6;
|
|
406
460
|
}
|
|
407
461
|
|
|
408
462
|
_initialPositionChanged(initialPosition) {
|
|
@@ -667,10 +721,6 @@ class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(Po
|
|
|
667
721
|
return months - date2.getMonth() + date1.getMonth();
|
|
668
722
|
}
|
|
669
723
|
|
|
670
|
-
_differenceInYears(date1, date2) {
|
|
671
|
-
return this._differenceInMonths(date1, date2) / 12;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
724
|
_clear() {
|
|
675
725
|
this._selectDate('');
|
|
676
726
|
}
|
|
@@ -10,11 +10,6 @@ export const datePickerStyles = css`
|
|
|
10
10
|
direction: ltr;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
:host([dir='rtl']) [part='value']::placeholder {
|
|
14
|
-
direction: rtl;
|
|
15
|
-
text-align: left;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
13
|
:host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
|
|
19
14
|
direction: rtl;
|
|
20
15
|
text-align: left;
|
|
@@ -89,6 +89,7 @@ class InfiniteScroller extends PolymerElement {
|
|
|
89
89
|
/**
|
|
90
90
|
* The amount of initial scroll top. Needed in order for the
|
|
91
91
|
* user to be able to scroll backwards.
|
|
92
|
+
* @private
|
|
92
93
|
*/
|
|
93
94
|
_initialScroll: {
|
|
94
95
|
value: 500000,
|
|
@@ -96,17 +97,22 @@ class InfiniteScroller extends PolymerElement {
|
|
|
96
97
|
|
|
97
98
|
/**
|
|
98
99
|
* The index/position mapped at _initialScroll point.
|
|
100
|
+
* @private
|
|
99
101
|
*/
|
|
100
102
|
_initialIndex: {
|
|
101
103
|
value: 0,
|
|
102
104
|
},
|
|
103
105
|
|
|
106
|
+
/** @private */
|
|
104
107
|
_buffers: Array,
|
|
105
108
|
|
|
109
|
+
/** @private */
|
|
106
110
|
_preventScrollEvent: Boolean,
|
|
107
111
|
|
|
112
|
+
/** @private */
|
|
108
113
|
_mayHaveMomentum: Boolean,
|
|
109
114
|
|
|
115
|
+
/** @private */
|
|
110
116
|
_initialized: Boolean,
|
|
111
117
|
|
|
112
118
|
active: {
|
|
@@ -116,10 +122,11 @@ class InfiniteScroller extends PolymerElement {
|
|
|
116
122
|
};
|
|
117
123
|
}
|
|
118
124
|
|
|
125
|
+
/** @protected */
|
|
119
126
|
ready() {
|
|
120
127
|
super.ready();
|
|
121
128
|
|
|
122
|
-
this._buffers =
|
|
129
|
+
this._buffers = [...this.shadowRoot.querySelectorAll('.buffer')];
|
|
123
130
|
|
|
124
131
|
this.$.fullHeight.style.height = `${this._initialScroll * 2}px`;
|
|
125
132
|
|
|
@@ -128,8 +135,8 @@ class InfiniteScroller extends PolymerElement {
|
|
|
128
135
|
forwardHostProp(prop, value) {
|
|
129
136
|
if (prop !== 'index') {
|
|
130
137
|
this._buffers.forEach((buffer) => {
|
|
131
|
-
[].forEach
|
|
132
|
-
|
|
138
|
+
[...buffer.children].forEach((slot) => {
|
|
139
|
+
slot._itemWrapper.instance[prop] = value;
|
|
133
140
|
});
|
|
134
141
|
});
|
|
135
142
|
}
|
|
@@ -143,6 +150,19 @@ class InfiniteScroller extends PolymerElement {
|
|
|
143
150
|
}
|
|
144
151
|
}
|
|
145
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Force the scroller to update clones after a reset, without
|
|
155
|
+
* waiting for the debouncer to resolve.
|
|
156
|
+
*/
|
|
157
|
+
forceUpdate() {
|
|
158
|
+
if (this._debouncerUpdateClones) {
|
|
159
|
+
this._buffers[0].updated = this._buffers[1].updated = false;
|
|
160
|
+
this._updateClones();
|
|
161
|
+
this._debouncerUpdateClones.cancel();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** @private */
|
|
146
166
|
_activated(active) {
|
|
147
167
|
if (active && !this._initialized) {
|
|
148
168
|
this._createPool();
|
|
@@ -150,11 +170,14 @@ class InfiniteScroller extends PolymerElement {
|
|
|
150
170
|
}
|
|
151
171
|
}
|
|
152
172
|
|
|
173
|
+
/** @private */
|
|
153
174
|
_finishInit() {
|
|
154
175
|
if (!this._initDone) {
|
|
155
176
|
// Once the first set of items start fading in, stamp the rest
|
|
156
177
|
this._buffers.forEach((buffer) => {
|
|
157
|
-
[].forEach
|
|
178
|
+
[...buffer.children].forEach((slot) => {
|
|
179
|
+
this._ensureStampedInstance(slot._itemWrapper);
|
|
180
|
+
});
|
|
158
181
|
});
|
|
159
182
|
|
|
160
183
|
if (!this._buffers[0].translateY) {
|
|
@@ -165,6 +188,7 @@ class InfiniteScroller extends PolymerElement {
|
|
|
165
188
|
}
|
|
166
189
|
}
|
|
167
190
|
|
|
191
|
+
/** @private */
|
|
168
192
|
_translateBuffer(up) {
|
|
169
193
|
const index = up ? 1 : 0;
|
|
170
194
|
this._buffers[index].translateY = this._buffers[index ? 0 : 1].translateY + this._bufferHeight * (index ? -1 : 1);
|
|
@@ -173,6 +197,7 @@ class InfiniteScroller extends PolymerElement {
|
|
|
173
197
|
this._buffers.reverse();
|
|
174
198
|
}
|
|
175
199
|
|
|
200
|
+
/** @private */
|
|
176
201
|
_scroll() {
|
|
177
202
|
if (this._scrollDisabled) {
|
|
178
203
|
return;
|
|
@@ -269,10 +294,12 @@ class InfiniteScroller extends PolymerElement {
|
|
|
269
294
|
return this._itemHeightVal;
|
|
270
295
|
}
|
|
271
296
|
|
|
297
|
+
/** @private */
|
|
272
298
|
get _bufferHeight() {
|
|
273
299
|
return this.itemHeight * this.bufferSize;
|
|
274
300
|
}
|
|
275
301
|
|
|
302
|
+
/** @private */
|
|
276
303
|
_reset() {
|
|
277
304
|
this._scrollDisabled = true;
|
|
278
305
|
this.$.scroller.scrollTop = this._initialScroll;
|
|
@@ -292,6 +319,7 @@ class InfiniteScroller extends PolymerElement {
|
|
|
292
319
|
this._scrollDisabled = false;
|
|
293
320
|
}
|
|
294
321
|
|
|
322
|
+
/** @private */
|
|
295
323
|
_createPool() {
|
|
296
324
|
const container = this.getBoundingClientRect();
|
|
297
325
|
this._buffers.forEach((buffer) => {
|
|
@@ -303,10 +331,10 @@ class InfiniteScroller extends PolymerElement {
|
|
|
303
331
|
const contentId = (InfiniteScroller._contentIndex = InfiniteScroller._contentIndex + 1 || 0);
|
|
304
332
|
const slotName = `vaadin-infinite-scroller-item-content-${contentId}`;
|
|
305
333
|
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
buffer.appendChild(
|
|
334
|
+
const slot = document.createElement('slot');
|
|
335
|
+
slot.setAttribute('name', slotName);
|
|
336
|
+
slot._itemWrapper = itemWrapper;
|
|
337
|
+
buffer.appendChild(slot);
|
|
310
338
|
|
|
311
339
|
itemWrapper.setAttribute('slot', slotName);
|
|
312
340
|
this.appendChild(itemWrapper);
|
|
@@ -325,6 +353,7 @@ class InfiniteScroller extends PolymerElement {
|
|
|
325
353
|
}, 1);
|
|
326
354
|
}
|
|
327
355
|
|
|
356
|
+
/** @private */
|
|
328
357
|
_ensureStampedInstance(itemWrapper) {
|
|
329
358
|
if (itemWrapper.firstElementChild) {
|
|
330
359
|
return;
|
|
@@ -340,6 +369,7 @@ class InfiniteScroller extends PolymerElement {
|
|
|
340
369
|
});
|
|
341
370
|
}
|
|
342
371
|
|
|
372
|
+
/** @private */
|
|
343
373
|
_updateClones(viewPortOnly) {
|
|
344
374
|
this._firstIndex = ~~((this._buffers[0].translateY - this._initialScroll) / this.itemHeight) + this._initialIndex;
|
|
345
375
|
|
|
@@ -348,8 +378,8 @@ class InfiniteScroller extends PolymerElement {
|
|
|
348
378
|
if (!buffer.updated) {
|
|
349
379
|
const firstIndex = this._firstIndex + this.bufferSize * bufferIndex;
|
|
350
380
|
|
|
351
|
-
[].forEach
|
|
352
|
-
const itemWrapper =
|
|
381
|
+
[...buffer.children].forEach((slot, index) => {
|
|
382
|
+
const itemWrapper = slot._itemWrapper;
|
|
353
383
|
if (!viewPortOnly || this._isVisible(itemWrapper, scrollerRect)) {
|
|
354
384
|
itemWrapper.instance.index = firstIndex + index;
|
|
355
385
|
}
|
|
@@ -359,6 +389,7 @@ class InfiniteScroller extends PolymerElement {
|
|
|
359
389
|
});
|
|
360
390
|
}
|
|
361
391
|
|
|
392
|
+
/** @private */
|
|
362
393
|
_isVisible(element, container) {
|
|
363
394
|
const rect = element.getBoundingClientRect();
|
|
364
395
|
return rect.bottom > container.top && rect.top < container.bottom;
|
|
@@ -428,12 +428,6 @@ class MonthCalendar extends FocusMixin(ThemableMixin(PolymerElement)) {
|
|
|
428
428
|
|
|
429
429
|
return '-1';
|
|
430
430
|
}
|
|
431
|
-
|
|
432
|
-
__getWeekNumbers(dates) {
|
|
433
|
-
return dates
|
|
434
|
-
.map((date) => this.__getWeekNumber(date, dates))
|
|
435
|
-
.filter((week, index, arr) => arr.indexOf(week) === index);
|
|
436
|
-
}
|
|
437
431
|
}
|
|
438
432
|
|
|
439
433
|
customElements.define(MonthCalendar.is, MonthCalendar);
|
|
@@ -36,7 +36,7 @@ registerStyles(
|
|
|
36
36
|
+ var(--lumo-size-m) * 6
|
|
37
37
|
+ var(--lumo-space-s)
|
|
38
38
|
);
|
|
39
|
-
--vaadin-infinite-scroller-buffer-offset:
|
|
39
|
+
--vaadin-infinite-scroller-buffer-offset: 10%;
|
|
40
40
|
-webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
|
41
41
|
mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
|
42
42
|
position: relative;
|
|
@@ -171,7 +171,7 @@ registerStyles(
|
|
|
171
171
|
color: var(--lumo-primary-contrast-color);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
/* TODO magic number (same as used for
|
|
174
|
+
/* TODO magic number (same as used for media-query in vaadin-date-picker-overlay-content) */
|
|
175
175
|
@media screen and (max-width: 374px) {
|
|
176
176
|
:host {
|
|
177
177
|
background-image: none;
|
|
@@ -113,11 +113,6 @@ registerStyles(
|
|
|
113
113
|
background: var(--material-background-color);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
:host([years-visible]) [part='years']::after {
|
|
117
|
-
top: calc(20px + 16px);
|
|
118
|
-
height: calc(100% - 20px - 16px);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
116
|
[part='year-number'] {
|
|
122
117
|
font-size: var(--material-small-font-size);
|
|
123
118
|
line-height: 10px; /* NOTE(platosha): chosen to align years to months */
|
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": "23.2.
|
|
4
|
+
"version": "23.2.6",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
"name": "vaadin-date-picker",
|
|
219
|
-
"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/23.2.
|
|
219
|
+
"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/23.2.6/#/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`overlay-content` | The overlay element\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`today` | Set on the date corresponding to the current day | date\n`selected` | Set on the selected date | date\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/23.2.6/#/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/23.2.6/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/23.2.6/#/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`months` | Months scroller\n`years` | Years scroller\n`toolbar` | Footer bar with buttons\n`today-button` | Today button\n`cancel-button` | Cancel button\n`month` | Month calendar\n`year-number` | Year number\n`year-separator` | Year separator\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\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.",
|
|
220
220
|
"attributes": [
|
|
221
221
|
{
|
|
222
222
|
"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": "23.2.
|
|
4
|
+
"version": "23.2.6",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"name": "vaadin-date-picker",
|
|
110
|
-
"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/23.2.
|
|
110
|
+
"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/23.2.6/#/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`overlay-content` | The overlay element\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`today` | Set on the date corresponding to the current day | date\n`selected` | Set on the selected date | date\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/23.2.6/#/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/23.2.6/#/elements/vaadin-overlay).\n- `<vaadin-date-picker-overlay-content>`\n- `<vaadin-month-calendar>`\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/23.2.6/#/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`months` | Months scroller\n`years` | Years scroller\n`toolbar` | Footer bar with buttons\n`today-button` | Today button\n`cancel-button` | Cancel button\n`month` | Month calendar\n`year-number` | Year number\n`year-separator` | Year separator\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\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.",
|
|
111
111
|
"extension": true,
|
|
112
112
|
"attributes": [
|
|
113
113
|
{
|