@vaadin/date-picker 24.6.0-beta1 → 24.7.0-alpha1

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.6.0-beta1",
3
+ "version": "24.7.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,19 +36,19 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.2.0",
39
- "@vaadin/a11y-base": "24.6.0-beta1",
40
- "@vaadin/button": "24.6.0-beta1",
41
- "@vaadin/component-base": "24.6.0-beta1",
42
- "@vaadin/field-base": "24.6.0-beta1",
43
- "@vaadin/input-container": "24.6.0-beta1",
44
- "@vaadin/overlay": "24.6.0-beta1",
45
- "@vaadin/vaadin-lumo-styles": "24.6.0-beta1",
46
- "@vaadin/vaadin-material-styles": "24.6.0-beta1",
47
- "@vaadin/vaadin-themable-mixin": "24.6.0-beta1",
39
+ "@vaadin/a11y-base": "24.7.0-alpha1",
40
+ "@vaadin/button": "24.7.0-alpha1",
41
+ "@vaadin/component-base": "24.7.0-alpha1",
42
+ "@vaadin/field-base": "24.7.0-alpha1",
43
+ "@vaadin/input-container": "24.7.0-alpha1",
44
+ "@vaadin/overlay": "24.7.0-alpha1",
45
+ "@vaadin/vaadin-lumo-styles": "24.7.0-alpha1",
46
+ "@vaadin/vaadin-material-styles": "24.7.0-alpha1",
47
+ "@vaadin/vaadin-themable-mixin": "24.7.0-alpha1",
48
48
  "lit": "^3.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@vaadin/chai-plugins": "24.6.0-beta1",
51
+ "@vaadin/chai-plugins": "24.7.0-alpha1",
52
52
  "@vaadin/testing-helpers": "^1.0.0",
53
53
  "sinon": "^18.0.0"
54
54
  },
@@ -56,5 +56,5 @@
56
56
  "web-types.json",
57
57
  "web-types.lit.json"
58
58
  ],
59
- "gitHead": "ab28efb0dcf2cd1ef72100e2e8f32232fa49aacc"
59
+ "gitHead": "04be941c9a7b659871c97f31b9cc3ffd7528087b"
60
60
  }
@@ -152,7 +152,10 @@ export const DatePickerMixin = (subclass) =>
152
152
  * Set true to prevent the overlay from opening automatically.
153
153
  * @attr {boolean} auto-open-disabled
154
154
  */
155
- autoOpenDisabled: Boolean,
155
+ autoOpenDisabled: {
156
+ type: Boolean,
157
+ sync: true,
158
+ },
156
159
 
157
160
  /**
158
161
  * Set true to display ISO-8601 week numbers in the calendar. Notice that
@@ -181,7 +184,7 @@ export const DatePickerMixin = (subclass) =>
181
184
  * @protected
182
185
  */
183
186
  _fullscreenMediaQuery: {
184
- value: '(max-width: 420px), (max-height: 420px)',
187
+ value: '(max-width: 450px), (max-height: 450px)',
185
188
  },
186
189
 
187
190
  /**
@@ -358,18 +361,10 @@ export const DatePickerMixin = (subclass) =>
358
361
  sync: true,
359
362
  },
360
363
 
361
- /**
362
- * In date-picker, unlike other components extending `InputMixin`,
363
- * the property indicates true only if the input has been entered by the user.
364
- * In the case of programmatic changes, the property is reset to false.
365
- * Read more about why this workaround is needed:
366
- * https://github.com/vaadin/web-components/issues/5639
367
- *
368
- * @protected
369
- * @override
370
- */
371
- _hasInputValue: {
372
- type: Boolean,
364
+ /** @private */
365
+ __enteredDate: {
366
+ type: Date,
367
+ sync: true,
373
368
  },
374
369
  };
375
370
  }
@@ -378,7 +373,7 @@ export const DatePickerMixin = (subclass) =>
378
373
  return [
379
374
  '_selectedDateChanged(_selectedDate, i18n)',
380
375
  '_focusedDateChanged(_focusedDate, i18n)',
381
- '__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)',
376
+ '__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled, __enteredDate)',
382
377
  '__updateOverlayContentTheme(_overlayContent, _theme)',
383
378
  '__updateOverlayContentFullScreen(_overlayContent, _fullscreen)',
384
379
  ];
@@ -396,28 +391,17 @@ export const DatePickerMixin = (subclass) =>
396
391
  this._boundOverlayRenderer = this._overlayRenderer.bind(this);
397
392
  }
398
393
 
399
- /**
400
- * @override
401
- * @protected
402
- */
394
+ /** @override */
403
395
  get _inputElementValue() {
404
396
  return super._inputElementValue;
405
397
  }
406
398
 
407
- /**
408
- * The setter is overridden to reset the `_hasInputValue` property
409
- * to false when the input element's value is updated programmatically.
410
- * In date-picker, `_hasInputValue` is supposed to indicate true only
411
- * if the input has been entered by the user.
412
- * Read more about why this workaround is needed:
413
- * https://github.com/vaadin/web-components/issues/5639
414
- *
415
- * @override
416
- * @protected
417
- */
399
+ /** @override */
418
400
  set _inputElementValue(value) {
419
401
  super._inputElementValue = value;
420
- this._hasInputValue = false;
402
+
403
+ const parsedDate = this.__parseDate(value);
404
+ this.__setEnteredDate(parsedDate);
421
405
  }
422
406
 
423
407
  /**
@@ -871,6 +855,7 @@ export const DatePickerMixin = (subclass) =>
871
855
  selectedDate,
872
856
  showWeekNumbers,
873
857
  isDateDisabled,
858
+ enteredDate,
874
859
  ) {
875
860
  if (overlayContent) {
876
861
  overlayContent.i18n = i18n;
@@ -881,6 +866,7 @@ export const DatePickerMixin = (subclass) =>
881
866
  overlayContent.selectedDate = selectedDate;
882
867
  overlayContent.showWeekNumbers = showWeekNumbers;
883
868
  overlayContent.isDateDisabled = isDateDisabled;
869
+ overlayContent.enteredDate = enteredDate;
884
870
  }
885
871
  }
886
872
 
@@ -1204,15 +1190,32 @@ export const DatePickerMixin = (subclass) =>
1204
1190
  this.open();
1205
1191
  }
1206
1192
 
1207
- if (this._inputElementValue) {
1208
- const parsedDate = this.__parseDate(this._inputElementValue);
1209
- if (parsedDate) {
1210
- this._ignoreFocusedDateChange = true;
1211
- if (!dateEquals(parsedDate, this._focusedDate)) {
1212
- this._focusedDate = parsedDate;
1213
- }
1214
- this._ignoreFocusedDateChange = false;
1193
+ const parsedDate = this.__parseDate(this._inputElementValue || '');
1194
+ if (parsedDate) {
1195
+ this._ignoreFocusedDateChange = true;
1196
+ if (!dateEquals(parsedDate, this._focusedDate)) {
1197
+ this._focusedDate = parsedDate;
1198
+ }
1199
+ this._ignoreFocusedDateChange = false;
1200
+ }
1201
+
1202
+ this.__setEnteredDate(parsedDate);
1203
+ }
1204
+
1205
+ /**
1206
+ * @param {Date} date
1207
+ * @private
1208
+ */
1209
+ __setEnteredDate(date) {
1210
+ if (date) {
1211
+ if (!dateEquals(this.__enteredDate, date)) {
1212
+ this.__enteredDate = date;
1215
1213
  }
1214
+ } else if (this.__enteredDate != null) {
1215
+ // Do not override initial undefined value with null
1216
+ // to avoid triggering a Lit update that can cause
1217
+ // other scheduled properties to flush too early.
1218
+ this.__enteredDate = null;
1216
1219
  }
1217
1220
  }
1218
1221
 
@@ -57,6 +57,7 @@ export const DatePickerOverlayContentMixin = (superClass) =>
57
57
  initialPosition: {
58
58
  type: Object,
59
59
  observer: '_initialPositionChanged',
60
+ sync: true,
60
61
  },
61
62
 
62
63
  _originDate: {
@@ -124,6 +125,11 @@ export const DatePickerOverlayContentMixin = (superClass) =>
124
125
  type: Function,
125
126
  },
126
127
 
128
+ enteredDate: {
129
+ type: Date,
130
+ sync: true,
131
+ },
132
+
127
133
  /**
128
134
  * Input label
129
135
  */
@@ -151,7 +157,7 @@ export const DatePickerOverlayContentMixin = (superClass) =>
151
157
 
152
158
  static get observers() {
153
159
  return [
154
- '__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)',
160
+ '__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled, enteredDate)',
155
161
  '__updateCancelButton(_cancelButton, i18n)',
156
162
  '__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)',
157
163
  '__updateYears(years, selectedDate, _theme)',
@@ -339,6 +345,7 @@ export const DatePickerOverlayContentMixin = (superClass) =>
339
345
  ignoreTaps,
340
346
  theme,
341
347
  isDateDisabled,
348
+ enteredDate,
342
349
  ) {
343
350
  if (calendars && calendars.length) {
344
351
  calendars.forEach((calendar) => {
@@ -350,6 +357,7 @@ export const DatePickerOverlayContentMixin = (superClass) =>
350
357
  calendar.selectedDate = selectedDate;
351
358
  calendar.showWeekNumbers = showWeekNumbers;
352
359
  calendar.ignoreTaps = ignoreTaps;
360
+ calendar.enteredDate = enteredDate;
353
361
 
354
362
  if (theme) {
355
363
  calendar.setAttribute('theme', theme);
@@ -571,6 +579,7 @@ export const DatePickerOverlayContentMixin = (superClass) =>
571
579
 
572
580
  if (!animate) {
573
581
  this._monthScroller.position = targetPosition;
582
+ this._monthScroller.forceUpdate();
574
583
  this._targetPosition = undefined;
575
584
  this._repositionYearScroller();
576
585
  this.__tryFocusDate();
@@ -626,6 +635,7 @@ export const DatePickerOverlayContentMixin = (superClass) =>
626
635
  );
627
636
 
628
637
  this._monthScroller.position = this._targetPosition;
638
+ this._monthScroller.forceUpdate();
629
639
  this._targetPosition = undefined;
630
640
 
631
641
  revealResolve();
@@ -19,7 +19,6 @@ stylesTemplate.innerHTML = `
19
19
  transform: translateX(100%);
20
20
  -webkit-tap-highlight-color: transparent;
21
21
  -webkit-user-select: none;
22
- -moz-user-select: none;
23
22
  user-select: none;
24
23
  /* Center the year scroller position. */
25
24
  --vaadin-infinite-scroller-buffer-offset: 50%;
@@ -247,6 +247,7 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
247
247
 
248
248
  /** @private */
249
249
  _onVaadinOverlayClose(e) {
250
+ // Prevent closing the overlay on label element click
250
251
  if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().includes(this)) {
251
252
  e.preventDefault();
252
253
  }
@@ -3,6 +3,7 @@
3
3
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
+ import { flush } from '@polymer/polymer/lib/utils/flush.js';
6
7
  import { timeOut } from '@vaadin/component-base/src/async.js';
7
8
  import { Debouncer } from '@vaadin/component-base/src/debounce.js';
8
9
  import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
@@ -200,16 +201,37 @@ export class InfiniteScroller extends HTMLElement {
200
201
  }
201
202
  }
202
203
 
204
+ /** @protected */
205
+ disconnectedCallback() {
206
+ if (this._debouncerScrollFinish) {
207
+ this._debouncerScrollFinish.cancel();
208
+ }
209
+
210
+ if (this._debouncerUpdateClones) {
211
+ this._debouncerUpdateClones.cancel();
212
+ }
213
+
214
+ if (this.__pendingFinishInit) {
215
+ cancelAnimationFrame(this.__pendingFinishInit);
216
+ }
217
+ }
218
+
203
219
  /**
204
220
  * Force the scroller to update clones after a reset, without
205
221
  * waiting for the debouncer to resolve.
206
222
  */
207
223
  forceUpdate() {
224
+ if (this._debouncerScrollFinish) {
225
+ this._debouncerScrollFinish.flush();
226
+ }
227
+
208
228
  if (this._debouncerUpdateClones) {
209
229
  this._buffers[0].updated = this._buffers[1].updated = false;
210
230
  this._updateClones();
211
231
  this._debouncerUpdateClones.cancel();
212
232
  }
233
+
234
+ flush();
213
235
  }
214
236
 
215
237
  /**
@@ -341,8 +363,9 @@ export class InfiniteScroller extends HTMLElement {
341
363
  }
342
364
  });
343
365
 
344
- requestAnimationFrame(() => {
366
+ this.__pendingFinishInit = requestAnimationFrame(() => {
345
367
  this._finishInit();
368
+ this.__pendingFinishInit = null;
346
369
  });
347
370
  }
348
371
 
@@ -357,6 +380,10 @@ export class InfiniteScroller extends HTMLElement {
357
380
  itemWrapper.instance = this._createElement();
358
381
  itemWrapper.appendChild(itemWrapper.instance);
359
382
 
383
+ if (itemWrapper.instance.performUpdate) {
384
+ itemWrapper.instance.performUpdate();
385
+ }
386
+
360
387
  Object.keys(tmpInstance).forEach((prop) => {
361
388
  itemWrapper.instance[prop] = tmpInstance[prop];
362
389
  });
@@ -364,7 +391,8 @@ export class InfiniteScroller extends HTMLElement {
364
391
 
365
392
  /** @private */
366
393
  _updateClones(viewPortOnly) {
367
- this._firstIndex = ~~((this._buffers[0].translateY - this._initialScroll) / this.itemHeight) + this._initialIndex;
394
+ this._firstIndex =
395
+ Math.round((this._buffers[0].translateY - this._initialScroll) / this.itemHeight) + this._initialIndex;
368
396
 
369
397
  const scrollerRect = viewPortOnly ? this.$.scroller.getBoundingClientRect() : undefined;
370
398
  this._buffers.forEach((buffer, bufferIndex) => {
@@ -30,22 +30,6 @@ class DatePickerOverlay extends DatePickerOverlayMixin(DirMixin(ThemableMixin(Po
30
30
  return [overlayStyles, datePickerOverlayStyles];
31
31
  }
32
32
 
33
- static get properties() {
34
- return {
35
- /**
36
- * When true, the overlay is visible and attached to body.
37
- * This property config is overridden to set `sync: true`.
38
- */
39
- opened: {
40
- type: Boolean,
41
- notify: true,
42
- observer: '_openedChanged',
43
- reflectToAttribute: true,
44
- sync: true,
45
- },
46
- };
47
- }
48
-
49
33
  /** @protected */
50
34
  render() {
51
35
  return html`
@@ -109,16 +109,25 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
109
109
  }
110
110
 
111
111
  /** @protected */
112
- firstUpdated() {
113
- super.firstUpdated();
112
+ ready() {
113
+ super.ready();
114
114
 
115
115
  this.addController(
116
- new InputController(this, (input) => {
117
- this._setInputElement(input);
118
- this._setFocusElement(input);
119
- this.stateTarget = input;
120
- this.ariaTarget = input;
121
- }),
116
+ new InputController(
117
+ this,
118
+ (input) => {
119
+ this._setInputElement(input);
120
+ this._setFocusElement(input);
121
+ this.stateTarget = input;
122
+ this.ariaTarget = input;
123
+ },
124
+ {
125
+ // The "search" word is a trick to prevent Safari from enabling AutoFill,
126
+ // which is causing click issues:
127
+ // https://github.com/vaadin/web-components/issues/6817#issuecomment-2268229567
128
+ uniqueIdPrefix: 'search-input',
129
+ },
130
+ ),
122
131
  );
123
132
  this.addController(new LabelledInputController(this.inputElement, this._labelController));
124
133
 
@@ -141,6 +150,7 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
141
150
 
142
151
  /** @private */
143
152
  _onVaadinOverlayClose(e) {
153
+ // Prevent closing the overlay on label element click
144
154
  if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().includes(this)) {
145
155
  e.preventDefault();
146
156
  }
@@ -59,7 +59,9 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolylitMixin(LitEle
59
59
  ${this.__getWeekNumber(week)}
60
60
  </td>
61
61
  ${week.map((date) => {
62
- const isFocused = dateEquals(date, this.focusedDate);
62
+ const isFocused =
63
+ dateEquals(date, this.focusedDate) && (this.__hasFocus || dateEquals(date, this.enteredDate));
64
+ const tabIndex = dateEquals(date, this.focusedDate) ? '0' : '-1';
63
65
  const isSelected = dateEquals(date, this.selectedDate);
64
66
  const isDisabled = !dateAllowed(date, this.minDate, this.maxDate, this.isDateDisabled);
65
67
  const greaterThanToday = date > normalizeDate(new Date());
@@ -81,7 +83,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolylitMixin(LitEle
81
83
  part="${parts.join(' ')}"
82
84
  .date="${date}"
83
85
  ?disabled="${isDisabled}"
84
- tabindex="${isFocused ? '0' : '-1'}"
86
+ tabindex="${tabIndex}"
85
87
  aria-selected="${isSelected ? 'true' : 'false'}"
86
88
  aria-disabled="${isDisabled ? 'true' : 'false'}"
87
89
  aria-label="${this.__getDayAriaLabel(date)}"
@@ -91,6 +91,10 @@ export const MonthCalendarMixin = (superClass) =>
91
91
  value: () => false,
92
92
  },
93
93
 
94
+ enteredDate: {
95
+ type: Date,
96
+ },
97
+
94
98
  disabled: {
95
99
  type: Boolean,
96
100
  reflectToAttribute: true,
@@ -110,6 +114,11 @@ export const MonthCalendarMixin = (superClass) =>
110
114
  _notTapping: {
111
115
  type: Boolean,
112
116
  },
117
+
118
+ /** @private */
119
+ __hasFocus: {
120
+ type: Boolean,
121
+ },
113
122
  };
114
123
  }
115
124
 
@@ -129,6 +138,12 @@ export const MonthCalendarMixin = (superClass) =>
129
138
  addListener(this.$.monthGrid, 'tap', this._handleTap.bind(this));
130
139
  }
131
140
 
141
+ /** @override */
142
+ _setFocused(focused) {
143
+ super._setFocused(focused);
144
+ this.__hasFocus = focused;
145
+ }
146
+
132
147
  /**
133
148
  * Returns true if all the dates in the month are out of the allowed range
134
149
  * @protected
@@ -50,7 +50,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
50
50
  <template is="dom-repeat" items="[[week]]">
51
51
  <td
52
52
  role="gridcell"
53
- part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled)]]"
53
+ part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled, enteredDate, __hasFocus)]]"
54
54
  date="[[item]]"
55
55
  tabindex$="[[__getDayTabindex(item, focusedDate)]]"
56
56
  disabled$="[[__isDayDisabled(item, minDate, maxDate, isDateDisabled)]]"
@@ -108,7 +108,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
108
108
 
109
109
  /** @private */
110
110
  // eslint-disable-next-line @typescript-eslint/max-params
111
- __getDatePart(date, focusedDate, selectedDate, minDate, maxDate, isDateDisabled) {
111
+ __getDatePart(date, focusedDate, selectedDate, minDate, maxDate, isDateDisabled, enteredDate, hasFocus) {
112
112
  const result = ['date'];
113
113
  const greaterThanToday = date > normalizeDate(new Date());
114
114
  const lessThanToday = date < normalizeDate(new Date());
@@ -117,7 +117,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
117
117
  result.push('disabled');
118
118
  }
119
119
 
120
- if (this.__isDayFocused(date, focusedDate)) {
120
+ if (dateEquals(date, focusedDate) && (hasFocus || dateEquals(date, enteredDate))) {
121
121
  result.push('focused');
122
122
  }
123
123
 
@@ -140,11 +140,6 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
140
140
  return result.join(' ');
141
141
  }
142
142
 
143
- /** @private */
144
- __isDayFocused(date, focusedDate) {
145
- return dateEquals(date, focusedDate);
146
- }
147
-
148
143
  /** @private */
149
144
  __isDaySelected(date, selectedDate) {
150
145
  return dateEquals(date, selectedDate);
@@ -175,11 +170,7 @@ class MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {
175
170
 
176
171
  /** @private */
177
172
  __getDayTabindex(date, focusedDate) {
178
- if (this.__isDayFocused(date, focusedDate)) {
179
- return '0';
180
- }
181
-
182
- return '-1';
173
+ return dateEquals(date, focusedDate) ? '0' : '-1';
183
174
  }
184
175
  }
185
176
 
@@ -41,7 +41,7 @@ const datePickerOverlay = css`
41
41
  margin-bottom: var(--lumo-space-xs);
42
42
  }
43
43
 
44
- @media (max-width: 420px), (max-height: 420px) {
44
+ @media (max-width: 450px), (max-height: 450px) {
45
45
  [part='overlay'] {
46
46
  width: 100vw;
47
47
  height: 70vh;
@@ -12,7 +12,7 @@ const datePicker = css`
12
12
  content: var(--lumo-icons-cross);
13
13
  }
14
14
 
15
- @media (max-width: 420px), (max-height: 420px) {
15
+ @media (max-width: 450px), (max-height: 450px) {
16
16
  [part='overlay-content'] {
17
17
  height: 70vh;
18
18
  }
@@ -9,7 +9,6 @@ registerStyles(
9
9
  'vaadin-month-calendar',
10
10
  css`
11
11
  :host {
12
- -moz-user-select: none;
13
12
  -webkit-user-select: none;
14
13
  -webkit-tap-highlight-color: transparent;
15
14
  user-select: none;
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.6.0-beta1",
4
+ "version": "24.7.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -366,7 +366,7 @@
366
366
  },
367
367
  {
368
368
  "name": "vaadin-date-picker",
369
- "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.6.0-beta1/#/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.6.0-beta1/#/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.6.0-beta1/#/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.6.0-beta1/#/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`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\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/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",
369
+ "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.7.0-alpha1/#/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.7.0-alpha1/#/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.7.0-alpha1/#/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.7.0-alpha1/#/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`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\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/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",
370
370
  "attributes": [
371
371
  {
372
372
  "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.6.0-beta1",
4
+ "version": "24.7.0-alpha1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -170,7 +170,7 @@
170
170
  },
171
171
  {
172
172
  "name": "vaadin-date-picker",
173
- "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.6.0-beta1/#/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.6.0-beta1/#/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.6.0-beta1/#/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.6.0-beta1/#/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`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\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/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",
173
+ "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.7.0-alpha1/#/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.7.0-alpha1/#/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.7.0-alpha1/#/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.7.0-alpha1/#/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`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\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/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",
174
174
  "extension": true,
175
175
  "attributes": [
176
176
  {