@vaadin/date-picker 25.3.0-dev.3a3c2d7d2a → 25.3.0-rc1

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.
@@ -17,10 +17,316 @@
17
17
  }
18
18
  ]
19
19
  },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "src/vaadin-date-metadata-controller.js",
23
+ "declarations": [
24
+ {
25
+ "kind": "class",
26
+ "description": "A reactive controller that resolves the metadata (currently the disabled state)\nfor the dates shown by the date-picker's `dateMetadataProvider`.\n\nThe provider is called for a range of months and may return an array\nsynchronously or a `Promise`, so results from a server (Flow) or a remote\navailability service can be awaited. The range and each returned entry identify\na date by an ISO 8601 string, e.g. `{ date: '2026-01-01', disabled: true }`.\n\n`ARCHITECTURE.md` in this package records the reasoning behind the request,\ncaching, notification and failure behavior.",
27
+ "name": "DateMetadataController",
28
+ "members": [
29
+ {
30
+ "kind": "method",
31
+ "name": "clearCache",
32
+ "description": "Clears the cache and invalidates any in-flight requests."
33
+ },
34
+ {
35
+ "kind": "method",
36
+ "name": "ensureRangeLoaded",
37
+ "parameters": [
38
+ {
39
+ "name": "startDate",
40
+ "type": {
41
+ "text": "Date | null | undefined"
42
+ }
43
+ },
44
+ {
45
+ "name": "endDate",
46
+ "type": {
47
+ "text": "Date | null | undefined"
48
+ }
49
+ }
50
+ ],
51
+ "description": "Ensures the provider has been consulted for the inclusive range between the\ngiven dates, rounded out to whole blocks of months. Months already loaded or in\nflight are skipped, and the ones left over are requested with a single call.\n\nEach call that finds a missing month issues its own request, so a caller that\nloads on scroll should debounce."
52
+ },
53
+ {
54
+ "kind": "method",
55
+ "name": "getMetadata",
56
+ "parameters": [
57
+ {
58
+ "name": "date",
59
+ "type": {
60
+ "text": "Date | null | undefined"
61
+ }
62
+ }
63
+ ],
64
+ "description": "The metadata resolved for the given date, or `undefined` when the date has\nno metadata or its month has not been resolved yet. Returns the entry the\nprovider supplied, which the caller must not modify.",
65
+ "return": {
66
+ "type": {
67
+ "text": "object | undefined"
68
+ }
69
+ }
70
+ },
71
+ {
72
+ "kind": "field",
73
+ "name": "host",
74
+ "description": "The controller host element.",
75
+ "type": {
76
+ "text": "ReactiveControllerHost & HTMLElement"
77
+ },
78
+ "default": "host"
79
+ },
80
+ {
81
+ "kind": "method",
82
+ "name": "hostConnected"
83
+ },
84
+ {
85
+ "kind": "method",
86
+ "name": "isDateDisabled",
87
+ "parameters": [
88
+ {
89
+ "name": "date",
90
+ "type": {
91
+ "text": "Date | null | undefined"
92
+ }
93
+ }
94
+ ],
95
+ "description": "Whether the given date is disabled by its metadata.",
96
+ "return": {
97
+ "type": {
98
+ "text": "boolean"
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "kind": "method",
104
+ "name": "isLoading",
105
+ "description": "Whether any month range is currently being fetched.",
106
+ "return": {
107
+ "type": {
108
+ "text": "boolean"
109
+ }
110
+ }
111
+ },
112
+ {
113
+ "kind": "method",
114
+ "name": "isMonthLoaded",
115
+ "parameters": [
116
+ {
117
+ "name": "date",
118
+ "type": {
119
+ "text": "Date | null | undefined"
120
+ }
121
+ }
122
+ ],
123
+ "description": "Whether the provider has answered for the month containing the given date.\nA month whose request failed is not loaded and will be requested again.",
124
+ "return": {
125
+ "type": {
126
+ "text": "boolean"
127
+ }
128
+ }
129
+ },
130
+ {
131
+ "kind": "method",
132
+ "name": "isMonthPending",
133
+ "parameters": [
134
+ {
135
+ "name": "date",
136
+ "type": {
137
+ "text": "Date | null | undefined"
138
+ }
139
+ }
140
+ ],
141
+ "description": "Whether the month containing the given date is currently being fetched. A month\nthat has not been asked about is not pending, so this reports the same state as\n`isLoading()` does for the whole cache.",
142
+ "return": {
143
+ "type": {
144
+ "text": "boolean"
145
+ }
146
+ }
147
+ },
148
+ {
149
+ "kind": "field",
150
+ "name": "provider",
151
+ "type": {
152
+ "text": "Function | null"
153
+ },
154
+ "default": "null",
155
+ "description": "The provider function, or `null` when none is set."
156
+ },
157
+ {
158
+ "kind": "method",
159
+ "name": "setProvider",
160
+ "parameters": [
161
+ {
162
+ "name": "provider",
163
+ "type": {
164
+ "text": "Function | null | undefined"
165
+ }
166
+ }
167
+ ],
168
+ "description": "Sets the provider function and clears the cache. Passing the same provider again\nis a no-op, so callers should keep a stable reference."
169
+ },
170
+ {
171
+ "kind": "method",
172
+ "name": "subscribe",
173
+ "parameters": [
174
+ {
175
+ "name": "element",
176
+ "type": {
177
+ "text": "ReactiveElement"
178
+ }
179
+ }
180
+ ],
181
+ "description": "Registers an element to be re-rendered whenever the resolved metadata or the\nloading state changes. The element must render from its bindings, and must not be\nthe one whose own observer triggers a load. It stays registered for the\ncontroller's lifetime."
182
+ }
183
+ ]
184
+ }
185
+ ],
186
+ "exports": [
187
+ {
188
+ "kind": "js",
189
+ "name": "DateMetadataController",
190
+ "declaration": {
191
+ "name": "DateMetadataController",
192
+ "module": "src/vaadin-date-metadata-controller.js"
193
+ }
194
+ }
195
+ ]
196
+ },
20
197
  {
21
198
  "kind": "javascript-module",
22
199
  "path": "src/vaadin-date-picker-helper.js",
23
200
  "declarations": [
201
+ {
202
+ "kind": "function",
203
+ "name": "createDate",
204
+ "parameters": [
205
+ {
206
+ "name": "year",
207
+ "type": {
208
+ "text": "number"
209
+ }
210
+ },
211
+ {
212
+ "name": "month",
213
+ "description": "Zero-based month, may be out of range to shift the year",
214
+ "type": {
215
+ "text": "number"
216
+ }
217
+ },
218
+ {
219
+ "name": "day",
220
+ "description": "May be `0` to select the last day of the previous month",
221
+ "type": {
222
+ "text": "number"
223
+ }
224
+ }
225
+ ],
226
+ "description": "Create a date at midnight in local time. Unlike `new Date(year, month, day)`,\nthis supports years below 100, which the constructor maps into the 20th\ncentury. The month is assigned before the day so that the initial day of month\n(1) always exists in the target month.",
227
+ "return": {
228
+ "type": {
229
+ "text": "Date"
230
+ }
231
+ }
232
+ },
233
+ {
234
+ "kind": "function",
235
+ "name": "firstOfMonth",
236
+ "parameters": [
237
+ {
238
+ "name": "date",
239
+ "type": {
240
+ "text": "!Date"
241
+ }
242
+ }
243
+ ],
244
+ "description": "Get the first day of the month the given date is in.",
245
+ "return": {
246
+ "type": {
247
+ "text": "Date"
248
+ }
249
+ }
250
+ },
251
+ {
252
+ "kind": "function",
253
+ "name": "lastOfMonth",
254
+ "parameters": [
255
+ {
256
+ "name": "date",
257
+ "type": {
258
+ "text": "!Date"
259
+ }
260
+ }
261
+ ],
262
+ "description": "Get the last day of the month the given date is in.",
263
+ "return": {
264
+ "type": {
265
+ "text": "Date"
266
+ }
267
+ }
268
+ },
269
+ {
270
+ "kind": "function",
271
+ "name": "monthIndexOf",
272
+ "parameters": [
273
+ {
274
+ "name": "year",
275
+ "type": {
276
+ "text": "number"
277
+ }
278
+ },
279
+ {
280
+ "name": "month",
281
+ "description": "Zero-based month",
282
+ "type": {
283
+ "text": "number"
284
+ }
285
+ }
286
+ ],
287
+ "description": "Get the index of a month, counted from January of year 0. Reduces a month to a single\ninteger, so a lookup builds no key and two months are adjacent when their indexes are.",
288
+ "return": {
289
+ "type": {
290
+ "text": "number"
291
+ }
292
+ }
293
+ },
294
+ {
295
+ "kind": "function",
296
+ "name": "monthIndex",
297
+ "parameters": [
298
+ {
299
+ "name": "date",
300
+ "type": {
301
+ "text": "!Date"
302
+ }
303
+ }
304
+ ],
305
+ "description": "Get the index of the month the given date is in.",
306
+ "return": {
307
+ "type": {
308
+ "text": "number"
309
+ }
310
+ }
311
+ },
312
+ {
313
+ "kind": "function",
314
+ "name": "monthDate",
315
+ "parameters": [
316
+ {
317
+ "name": "index",
318
+ "type": {
319
+ "text": "number"
320
+ }
321
+ }
322
+ ],
323
+ "description": "Get the first day of the month with the given index, inverting `monthIndexOf`. Counting from\nJanuary of year 0 also inverts negative indexes, since `createDate` normalizes a month outside\n0-11 into the year.",
324
+ "return": {
325
+ "type": {
326
+ "text": "Date"
327
+ }
328
+ }
329
+ },
24
330
  {
25
331
  "kind": "function",
26
332
  "name": "getISOWeekNumber",
@@ -166,6 +472,54 @@
166
472
  }
167
473
  }
168
474
  },
475
+ {
476
+ "kind": "function",
477
+ "name": "dateSelectable",
478
+ "parameters": [
479
+ {
480
+ "name": "date",
481
+ "description": "The date to check",
482
+ "type": {
483
+ "text": "!Date"
484
+ }
485
+ },
486
+ {
487
+ "name": "min",
488
+ "description": "Range start",
489
+ "type": {
490
+ "text": "Date | null"
491
+ }
492
+ },
493
+ {
494
+ "name": "max",
495
+ "description": "Range end",
496
+ "type": {
497
+ "text": "Date | null"
498
+ }
499
+ },
500
+ {
501
+ "name": "isDateDisabled",
502
+ "description": "Callback to check if the date is disabled",
503
+ "type": {
504
+ "text": "function(!DatePickerDate): boolean"
505
+ }
506
+ },
507
+ {
508
+ "name": "controller",
509
+ "description": "The date metadata controller",
510
+ "optional": true,
511
+ "type": {
512
+ "text": "DateMetadataController | null"
513
+ }
514
+ }
515
+ ],
516
+ "description": "Check if the given date can be selected: allowed by `dateAllowed` and not reported as disabled\nby the date metadata controller. This is narrower than `dateAllowed`, which decides what can be\nfocused: a disabled date is still focusable, it just cannot be selected.",
517
+ "return": {
518
+ "type": {
519
+ "text": "boolean"
520
+ }
521
+ }
522
+ },
169
523
  {
170
524
  "kind": "function",
171
525
  "name": "getClosestDate",
@@ -262,7 +616,7 @@
262
616
  }
263
617
  }
264
618
  ],
265
- "description": "Parse date string of one of the following date formats:\n- ISO 8601 `\"YYYY-MM-DD\"`\n- 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`",
619
+ "description": "Parse date string of one of the following date formats:\n- ISO 8601 `\"YYYY-MM-DD\"`\n- Extended ISO 8601 with a signed year, e.g. `\"+012026-MM-DD\"` or `\"-0001-MM-DD\"`\n\nA date that does not exist, such as `\"2026-02-30\"`, is not parsed. Building it would carry the\nsurplus into the next month or year and answer with a date that was never asked for.",
266
620
  "return": {
267
621
  "type": {
268
622
  "text": "Date"
@@ -281,7 +635,7 @@
281
635
  }
282
636
  }
283
637
  ],
284
- "description": "Parse date string of one of the following date formats:\n- ISO 8601 `\"YYYY-MM-DD\"`\n- 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`\n\nUses UTC date components to allow handling date instances independently of\nthe system time-zone.",
638
+ "description": "Parse date string of one of the following date formats:\n- ISO 8601 `\"YYYY-MM-DD\"`\n- Extended ISO 8601 with a signed year, e.g. `\"+012026-MM-DD\"` or `\"-0001-MM-DD\"`\n\nUses UTC date components to allow handling date instances independently of\nthe system time-zone.\n\nA date that does not exist, such as `\"2026-02-30\"`, is not parsed, as in `parseDate`.",
285
639
  "return": {
286
640
  "type": {
287
641
  "text": "Date"
@@ -325,9 +679,57 @@
325
679
  "text": "string"
326
680
  }
327
681
  }
328
- }
329
- ],
330
- "exports": [
682
+ }
683
+ ],
684
+ "exports": [
685
+ {
686
+ "kind": "js",
687
+ "name": "createDate",
688
+ "declaration": {
689
+ "name": "createDate",
690
+ "module": "src/vaadin-date-picker-helper.js"
691
+ }
692
+ },
693
+ {
694
+ "kind": "js",
695
+ "name": "firstOfMonth",
696
+ "declaration": {
697
+ "name": "firstOfMonth",
698
+ "module": "src/vaadin-date-picker-helper.js"
699
+ }
700
+ },
701
+ {
702
+ "kind": "js",
703
+ "name": "lastOfMonth",
704
+ "declaration": {
705
+ "name": "lastOfMonth",
706
+ "module": "src/vaadin-date-picker-helper.js"
707
+ }
708
+ },
709
+ {
710
+ "kind": "js",
711
+ "name": "monthIndexOf",
712
+ "declaration": {
713
+ "name": "monthIndexOf",
714
+ "module": "src/vaadin-date-picker-helper.js"
715
+ }
716
+ },
717
+ {
718
+ "kind": "js",
719
+ "name": "monthIndex",
720
+ "declaration": {
721
+ "name": "monthIndex",
722
+ "module": "src/vaadin-date-picker-helper.js"
723
+ }
724
+ },
725
+ {
726
+ "kind": "js",
727
+ "name": "monthDate",
728
+ "declaration": {
729
+ "name": "monthDate",
730
+ "module": "src/vaadin-date-picker-helper.js"
731
+ }
732
+ },
331
733
  {
332
734
  "kind": "js",
333
735
  "name": "getISOWeekNumber",
@@ -376,6 +778,14 @@
376
778
  "module": "src/vaadin-date-picker-helper.js"
377
779
  }
378
780
  },
781
+ {
782
+ "kind": "js",
783
+ "name": "dateSelectable",
784
+ "declaration": {
785
+ "name": "dateSelectable",
786
+ "module": "src/vaadin-date-picker-helper.js"
787
+ }
788
+ },
379
789
  {
380
790
  "kind": "js",
381
791
  "name": "getClosestDate",
@@ -494,11 +904,26 @@
494
904
  "package": "@vaadin/field-base/src/input-mixin.js"
495
905
  }
496
906
  },
907
+ {
908
+ "kind": "method",
909
+ "name": "clearCache",
910
+ "description": "Clears the `dateMetadataProvider` cache and reloads the date metadata."
911
+ },
497
912
  {
498
913
  "kind": "method",
499
914
  "name": "close",
500
915
  "description": "Closes the dropdown."
501
916
  },
917
+ {
918
+ "kind": "field",
919
+ "name": "dateMetadataProvider",
920
+ "privacy": "public",
921
+ "type": {
922
+ "text": "DatePickerDateMetadataProvider | null | undefined"
923
+ },
924
+ "description": "A function that provides metadata for the dates the calendar is about to render: whether they\nare disabled, and CSS `part` names for styling from outside using the `::part()` selector.\nUnlike `isDateDisabled`, which is called once per date, the metadata provider is called for\na range of dates at a time, and again as the calendar renders further dates.\n\nIt receives a `DatePickerDateRange` and returns an array of `DatePickerDateMetadata` objects\nfor the dates in that range that have metadata. It can return a `Promise` to load the metadata\nasynchronously, and `null` or `undefined` when no date in the range has metadata.\n\nThe returned array has the following structure:\n\n```js\n[\n // The date is an ISO 8601 string.\n { date: '2026-01-01', disabled: true },\n\n // Adds a custom part name to the date.\n { date: '2026-01-02', part: 'busy' },\n]\n```\n\nA date is disabled if its metadata marks it disabled, or `isDateDisabled` returns `true`, or\nit is outside `min` and `max`. Disabled dates are not selectable, and typing a disabled date in\nthe field makes it invalid. The provider does not affect which date is focused when opening the\noverlay. Use `initialPosition` property to provide a selectable date.\n\nWhile a returned `Promise` is pending, the dates it covers are not disabled yet and render with\nthe `loading` part. If the function throws or rejects, corresponding dates are requested again\nthe next time the user navigates.\n\nThe provider is used for validation also when the overlay is closed. Date is considered valid\nwhile the provider is pending, and is re-validated again after the metadata is loaded.\n\nKeep a stable reference to the function: assigning a new one clears the cache and re-fetches\nvisible range. Call `clearCache()` to re-fetch when the data behind the same function changed.",
925
+ "attribute": "date-metadata-provider"
926
+ },
502
927
  {
503
928
  "kind": "field",
504
929
  "name": "disabled",
@@ -513,16 +938,6 @@
513
938
  "package": "@vaadin/a11y-base/src/tabindex-mixin.js"
514
939
  }
515
940
  },
516
- {
517
- "kind": "field",
518
- "name": "disabledDatesProvider",
519
- "privacy": "public",
520
- "type": {
521
- "text": "function(DatePickerDateRange): Array<DatePickerDate> | Promise<Array<DatePickerDate>> | undefined"
522
- },
523
- "description": "A batch function that is consulted for a range of dates that the calendar is about\nto render. It receives a `DatePickerDateRange` object (`{ start, end }` of\n`DatePickerDate`) and returns, or resolves with, an array of `DatePickerDate` objects\nthat should be disabled within that range.\n\nUnlike `isDateDisabled`, which is called once per date, this function is called for a\nrange of dates at a time, and again as the calendar renders further dates. The size of\nthe range is decided by the calendar and may span multiple months. It may return a\n`Promise`, in which case the affected dates render in a non-selectable pending state\nuntil it resolves.\n\nDates disabled by this function are combined with `min`, `max` and `isDateDisabled`:\na date is disabled if it is out of the min/max range, or `isDateDisabled` returns\n`true`, or it is included in this function's result.\n\nKeep a stable reference to the function. Assigning a new function resets the internal\ncache and re-fetches every visible range.",
524
- "attribute": "disabled-dates-provider"
525
- },
526
941
  {
527
942
  "kind": "field",
528
943
  "name": "i18n",
@@ -530,7 +945,7 @@
530
945
  "type": {
531
946
  "text": "Object"
532
947
  },
533
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n // An array with the full names of months starting\n // with January.\n monthNames: [\n 'January', 'February', 'March', 'April', 'May',\n 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ],\n\n // An array of weekday names starting with Sunday. Used\n // in screen reader announcements.\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n\n // An array of short weekday names starting with Sunday.\n // Displayed in the calendar.\n weekdaysShort: [\n 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'\n ],\n\n // An integer indicating the first day of the week\n // (0 = Sunday, 1 = Monday, etc.).\n firstDayOfWeek: 0,\n\n // Translation of the Today shortcut button text.\n today: 'Today',\n\n // Translation of the Cancel button text.\n cancel: 'Cancel',\n\n // Used for adjusting the year value when parsing dates with short years.\n // The year values between 0 and 99 are evaluated and adjusted.\n // Example: for a referenceDate of 1970-10-30;\n // dateToBeParsed: 40-10-30, result: 1940-10-30\n // dateToBeParsed: 80-10-30, result: 1980-10-30\n // dateToBeParsed: 10-10-30, result: 2010-10-30\n // Supported date format: ISO 8601 `\"YYYY-MM-DD\"` (default)\n // The default value is the current date.\n referenceDate: '',\n\n // A function to format given `Object` as\n // date string. Object is in the format `{ day: ..., month: ..., year: ... }`\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n formatDate: d => {\n // returns a string representation of the given\n // object in 'MM/DD/YYYY' -format\n },\n\n // A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n // Must properly parse (at least) text formatted by `formatDate`.\n // Setting the property to null will disable keyboard input feature.\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n parseDate: text => {\n // Parses a string in 'MM/DD/YY', 'MM/DD' or 'DD' -format to\n // an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n }\n\n // A function to format given `monthName` and\n // `fullYear` integer as calendar title string.\n formatTitle: (monthName, fullYear) => {\n return monthName + ' ' + fullYear;\n }\n}\n```",
948
+ "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n // An array with the full names of months starting\n // with January.\n monthNames: [\n 'January', 'February', 'March', 'April', 'May',\n 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ],\n\n // An array of weekday names starting with Sunday. Used\n // in screen reader announcements.\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n\n // An array of short weekday names starting with Sunday.\n // Displayed in the calendar.\n weekdaysShort: [\n 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'\n ],\n\n // An integer indicating the first day of the week\n // (0 = Sunday, 1 = Monday, etc.).\n firstDayOfWeek: 0,\n\n // Translation of the Today shortcut button text.\n today: 'Today',\n\n // Translation of the Cancel button text.\n cancel: 'Cancel',\n\n // Accessible name of the overlay content, announced by screen readers\n // when the overlay opens.\n dialogAccessibleName: 'Calendar',\n\n // Used for adjusting the year value when parsing dates with short years.\n // The year values between 0 and 99 are evaluated and adjusted.\n // Example: for a referenceDate of 1970-10-30;\n // dateToBeParsed: 40-10-30, result: 1940-10-30\n // dateToBeParsed: 80-10-30, result: 1980-10-30\n // dateToBeParsed: 10-10-30, result: 2010-10-30\n // Supported date format: ISO 8601 `\"YYYY-MM-DD\"` (default)\n // The default value is the current date.\n referenceDate: '',\n\n // A function to format given `Object` as\n // date string. Object is in the format `{ day: ..., month: ..., year: ... }`\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n formatDate: d => {\n // returns a string representation of the given\n // object in 'MM/DD/YYYY' -format\n },\n\n // A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n // Must properly parse (at least) text formatted by `formatDate`.\n // Setting the property to null will disable keyboard input feature.\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n parseDate: text => {\n // Parses a string in 'MM/DD/YY', 'MM/DD' or 'DD' -format to\n // an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n }\n\n // A function to format given `monthName` and\n // `fullYear` integer as calendar title string.\n formatTitle: (monthName, fullYear) => {\n return monthName + ' ' + fullYear;\n }\n}\n```",
534
949
  "attribute": "i18n",
535
950
  "inheritedFrom": {
536
951
  "name": "I18nMixin",
@@ -568,7 +983,7 @@
568
983
  "type": {
569
984
  "text": "function(DatePickerDate): boolean | undefined"
570
985
  },
571
- "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.",
986
+ "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.\n\nThe function is called once per date and has to answer synchronously. Use\n`dateMetadataProvider` when the answer has to be loaded first, or when dates also need\ncustom part names. A date is disabled when either of the two disables it.",
572
987
  "attribute": "is-date-disabled"
573
988
  },
574
989
  {
@@ -722,6 +1137,14 @@
722
1137
  "package": "@vaadin/a11y-base/src/delegate-focus-mixin.js"
723
1138
  }
724
1139
  },
1140
+ {
1141
+ "name": "date-metadata-provider",
1142
+ "type": {
1143
+ "text": "DatePickerDateMetadataProvider | null | undefined"
1144
+ },
1145
+ "description": "A function that provides metadata for the dates the calendar is about to render: whether they\nare disabled, and CSS `part` names for styling from outside using the `::part()` selector.\nUnlike `isDateDisabled`, which is called once per date, the metadata provider is called for\na range of dates at a time, and again as the calendar renders further dates.\n\nIt receives a `DatePickerDateRange` and returns an array of `DatePickerDateMetadata` objects\nfor the dates in that range that have metadata. It can return a `Promise` to load the metadata\nasynchronously, and `null` or `undefined` when no date in the range has metadata.\n\nThe returned array has the following structure:\n\n```js\n[\n // The date is an ISO 8601 string.\n { date: '2026-01-01', disabled: true },\n\n // Adds a custom part name to the date.\n { date: '2026-01-02', part: 'busy' },\n]\n```\n\nA date is disabled if its metadata marks it disabled, or `isDateDisabled` returns `true`, or\nit is outside `min` and `max`. Disabled dates are not selectable, and typing a disabled date in\nthe field makes it invalid. The provider does not affect which date is focused when opening the\noverlay. Use `initialPosition` property to provide a selectable date.\n\nWhile a returned `Promise` is pending, the dates it covers are not disabled yet and render with\nthe `loading` part. If the function throws or rejects, corresponding dates are requested again\nthe next time the user navigates.\n\nThe provider is used for validation also when the overlay is closed. Date is considered valid\nwhile the provider is pending, and is re-validated again after the metadata is loaded.\n\nKeep a stable reference to the function: assigning a new one clears the cache and re-fetches\nvisible range. Call `clearCache()` to re-fetch when the data behind the same function changed.",
1146
+ "fieldName": "dateMetadataProvider"
1147
+ },
725
1148
  {
726
1149
  "name": "disabled",
727
1150
  "type": {
@@ -771,7 +1194,7 @@
771
1194
  "type": {
772
1195
  "text": "function(DatePickerDate): boolean | undefined"
773
1196
  },
774
- "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.",
1197
+ "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.\n\nThe function is called once per date and has to answer synchronously. Use\n`dateMetadataProvider` when the answer has to be loaded first, or when dates also need\ncustom part names. A date is disabled when either of the two disables it.",
775
1198
  "fieldName": "isDateDisabled"
776
1199
  },
777
1200
  {
@@ -906,14 +1329,9 @@
906
1329
  "attribute": "calendars"
907
1330
  },
908
1331
  {
909
- "kind": "field",
910
- "name": "disabledDatesProvider",
911
- "privacy": "public",
912
- "type": {
913
- "text": "function(DatePickerDateRange): Array<DatePickerDate> | Promise<Array<DatePickerDate>> | undefined"
914
- },
915
- "description": "A batch function that is consulted for a range of dates the calendar is about to render\nand returns, or resolves with, an array of `DatePickerDate` objects to disable.",
916
- "attribute": "disabled-dates-provider"
1332
+ "kind": "method",
1333
+ "name": "cancelLoadVisibleDateMetadata",
1334
+ "description": "Drops a date metadata load that navigating has scheduled but that has not run yet."
917
1335
  },
918
1336
  {
919
1337
  "kind": "field",
@@ -1003,14 +1421,9 @@
1003
1421
  "attribute": "label"
1004
1422
  },
1005
1423
  {
1006
- "kind": "field",
1007
- "name": "loading",
1008
- "privacy": "public",
1009
- "type": {
1010
- "text": "boolean"
1011
- },
1012
- "description": "Reflected while data is being loaded, so the overlay can show a loading spinner.\nCurrently set while the disabled dates provider is resolving.",
1013
- "attribute": "loading"
1424
+ "kind": "method",
1425
+ "name": "loadVisibleDateMetadata",
1426
+ "description": "Requests the date metadata for the months currently rendered. Months already loaded or in flight\nare skipped."
1014
1427
  },
1015
1428
  {
1016
1429
  "kind": "field",
@@ -1091,6 +1504,11 @@
1091
1504
  },
1092
1505
  "attribute": "show-week-numbers"
1093
1506
  },
1507
+ {
1508
+ "kind": "method",
1509
+ "name": "updateTodayButton",
1510
+ "description": "Applies the today button's label and whether today can be selected."
1511
+ },
1094
1512
  {
1095
1513
  "kind": "field",
1096
1514
  "name": "years",
@@ -1155,14 +1573,6 @@
1155
1573
  "description": "Input label",
1156
1574
  "fieldName": "label"
1157
1575
  },
1158
- {
1159
- "name": "loading",
1160
- "type": {
1161
- "text": "boolean"
1162
- },
1163
- "description": "Reflected while data is being loaded, so the overlay can show a loading spinner.\nCurrently set while the disabled dates provider is resolving.",
1164
- "fieldName": "loading"
1165
- },
1166
1576
  {
1167
1577
  "name": "scroll-duration",
1168
1578
  "type": {
@@ -1212,6 +1622,20 @@
1212
1622
  "description": "",
1213
1623
  "name": "DatePickerOverlayMixin",
1214
1624
  "members": [
1625
+ {
1626
+ "kind": "field",
1627
+ "name": "autofocus",
1628
+ "privacy": "public",
1629
+ "type": {
1630
+ "text": "boolean"
1631
+ },
1632
+ "description": "Set to true to move focus into the overlay automatically on open.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
1633
+ "attribute": "autofocus",
1634
+ "inheritedFrom": {
1635
+ "name": "OverlayFocusMixin",
1636
+ "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
1637
+ }
1638
+ },
1215
1639
  {
1216
1640
  "kind": "method",
1217
1641
  "name": "bringToFront",
@@ -1244,7 +1668,7 @@
1244
1668
  "type": {
1245
1669
  "text": "boolean"
1246
1670
  },
1247
- "description": "When true, opening the overlay moves focus to the first focusable child,\nor to the overlay part with tabindex if there are no focusable children.",
1671
+ "description": "Set to true to move focus into the overlay automatically on open\nand keep it inside: Tab and Shift+Tab cycle through the overlay's\ncontent until the overlay is closed.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
1248
1672
  "attribute": "focus-trap",
1249
1673
  "inheritedFrom": {
1250
1674
  "name": "OverlayFocusMixin",
@@ -1511,12 +1935,24 @@
1511
1935
  }
1512
1936
  ],
1513
1937
  "attributes": [
1938
+ {
1939
+ "name": "autofocus",
1940
+ "type": {
1941
+ "text": "boolean"
1942
+ },
1943
+ "description": "Set to true to move focus into the overlay automatically on open.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
1944
+ "fieldName": "autofocus",
1945
+ "inheritedFrom": {
1946
+ "name": "OverlayFocusMixin",
1947
+ "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
1948
+ }
1949
+ },
1514
1950
  {
1515
1951
  "name": "focus-trap",
1516
1952
  "type": {
1517
1953
  "text": "boolean"
1518
1954
  },
1519
- "description": "When true, opening the overlay moves focus to the first focusable child,\nor to the overlay part with tabindex if there are no focusable children.",
1955
+ "description": "Set to true to move focus into the overlay automatically on open\nand keep it inside: Tab and Shift+Tab cycle through the overlay's\ncontent until the overlay is closed.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
1520
1956
  "fieldName": "focusTrap",
1521
1957
  "inheritedFrom": {
1522
1958
  "name": "OverlayFocusMixin",
@@ -1721,9 +2157,23 @@
1721
2157
  "declarations": [
1722
2158
  {
1723
2159
  "kind": "class",
1724
- "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\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`loader` | Loading spinner shown while data is being loaded, for example while the disabled dates provider resolves\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`loading` | Set while data is being loaded, for example while the disabled dates provider resolves\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`pending` | Date element in a month whose disabled dates provider result is still loading\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",
2160
+ "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\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 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\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:----------------------------------------------------------|\n| `--vaadin-date-picker-date-border-radius` |\n| `--vaadin-date-picker-date-disabled-color` |\n| `--vaadin-date-picker-date-height` |\n| `--vaadin-date-picker-date-selected-background` |\n| `--vaadin-date-picker-date-selected-color` |\n| `--vaadin-date-picker-date-today-color` |\n| `--vaadin-date-picker-date-width` |\n| `--vaadin-date-picker-month-header-color` |\n| `--vaadin-date-picker-month-header-font-size` |\n| `--vaadin-date-picker-month-header-font-weight` |\n| `--vaadin-date-picker-month-padding` |\n| `--vaadin-date-picker-overlay-max-height` |\n| `--vaadin-date-picker-overlay-width` |\n| `--vaadin-date-picker-toolbar-padding` |\n| `--vaadin-date-picker-week-divider-color` |\n| `--vaadin-date-picker-week-number-color` |\n| `--vaadin-date-picker-week-number-font-size` |\n| `--vaadin-date-picker-weekday-color` |\n| `--vaadin-date-picker-weekday-font-size` |\n| `--vaadin-date-picker-weekday-font-weight` |\n| `--vaadin-date-picker-year-scroller-background` |\n| `--vaadin-date-picker-year-scroller-border-color` |\n| `--vaadin-date-picker-year-scroller-current-year-color` |\n| `--vaadin-date-picker-year-scroller-width` |\n| `--vaadin-field-default-width` |\n| `--vaadin-input-field-background` |\n| `--vaadin-input-field-border-color` |\n| `--vaadin-input-field-border-radius` |\n| `--vaadin-input-field-border-width` |\n| `--vaadin-input-field-bottom-end-radius` |\n| `--vaadin-input-field-bottom-start-radius` |\n| `--vaadin-input-field-button-text-color` |\n| `--vaadin-input-field-container-gap` |\n| `--vaadin-input-field-disabled-background` |\n| `--vaadin-input-field-disabled-text-color` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-gap` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-padding` |\n| `--vaadin-input-field-placeholder-color` |\n| `--vaadin-input-field-required-indicator` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-top-end-radius` |\n| `--vaadin-input-field-top-start-radius` |\n| `--vaadin-input-field-value-color` |\n| `--vaadin-input-field-value-font-size` |\n| `--vaadin-input-field-value-font-weight` |\n| `--vaadin-input-field-value-line-height` |\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`loader` | Loading spinner shown while the date metadata provider is resolving\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`loading` | Set while the date metadata provider is resolving\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`loading` | Date element in a month whose metadata is currently being fetched\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",
1725
2161
  "name": "DatePicker",
1726
2162
  "members": [
2163
+ {
2164
+ "kind": "field",
2165
+ "name": "accessibleDescriptionRef",
2166
+ "privacy": "public",
2167
+ "type": {
2168
+ "text": "string"
2169
+ },
2170
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
2171
+ "attribute": "accessible-description-ref",
2172
+ "inheritedFrom": {
2173
+ "name": "FieldMixin",
2174
+ "package": "@vaadin/field-base/src/field-mixin.js"
2175
+ }
2176
+ },
1727
2177
  {
1728
2178
  "kind": "field",
1729
2179
  "name": "accessibleName",
@@ -1731,7 +2181,7 @@
1731
2181
  "type": {
1732
2182
  "text": "string"
1733
2183
  },
1734
- "description": "String used to label the component to screen reader users.",
2184
+ "description": "String used to label the component for screen reader users.",
1735
2185
  "attribute": "accessible-name",
1736
2186
  "inheritedFrom": {
1737
2187
  "name": "FieldMixin",
@@ -1745,7 +2195,7 @@
1745
2195
  "type": {
1746
2196
  "text": "string"
1747
2197
  },
1748
- "description": "Id of the element used as label of the component to screen reader users.",
2198
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
1749
2199
  "attribute": "accessible-name-ref",
1750
2200
  "inheritedFrom": {
1751
2201
  "name": "FieldMixin",
@@ -1838,13 +2288,22 @@
1838
2288
  "type": {
1839
2289
  "text": "boolean"
1840
2290
  },
1841
- "description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
2291
+ "description": "Set to true to display the clear icon which clears the input.\nThis also enables clearing the input when pressing Esc key.",
1842
2292
  "attribute": "clear-button-visible",
1843
2293
  "inheritedFrom": {
1844
2294
  "name": "ClearButtonMixin",
1845
2295
  "package": "@vaadin/field-base/src/clear-button-mixin.js"
1846
2296
  }
1847
2297
  },
2298
+ {
2299
+ "kind": "method",
2300
+ "name": "clearCache",
2301
+ "description": "Clears the `dateMetadataProvider` cache and reloads the date metadata.",
2302
+ "inheritedFrom": {
2303
+ "name": "DatePickerMixin",
2304
+ "module": "src/vaadin-date-picker-mixin.js"
2305
+ }
2306
+ },
1848
2307
  {
1849
2308
  "kind": "method",
1850
2309
  "name": "close",
@@ -1856,30 +2315,30 @@
1856
2315
  },
1857
2316
  {
1858
2317
  "kind": "field",
1859
- "name": "disabled",
2318
+ "name": "dateMetadataProvider",
1860
2319
  "privacy": "public",
1861
2320
  "type": {
1862
- "text": "boolean"
2321
+ "text": "DatePickerDateMetadataProvider | null | undefined"
1863
2322
  },
1864
- "description": "If true, the user cannot interact with this element.",
1865
- "attribute": "disabled",
2323
+ "description": "A function that provides metadata for the dates the calendar is about to render: whether they\nare disabled, and CSS `part` names for styling from outside using the `::part()` selector.\nUnlike `isDateDisabled`, which is called once per date, the metadata provider is called for\na range of dates at a time, and again as the calendar renders further dates.\n\nIt receives a `DatePickerDateRange` and returns an array of `DatePickerDateMetadata` objects\nfor the dates in that range that have metadata. It can return a `Promise` to load the metadata\nasynchronously, and `null` or `undefined` when no date in the range has metadata.\n\nThe returned array has the following structure:\n\n```js\n[\n // The date is an ISO 8601 string.\n { date: '2026-01-01', disabled: true },\n\n // Adds a custom part name to the date.\n { date: '2026-01-02', part: 'busy' },\n]\n```\n\nA date is disabled if its metadata marks it disabled, or `isDateDisabled` returns `true`, or\nit is outside `min` and `max`. Disabled dates are not selectable, and typing a disabled date in\nthe field makes it invalid. The provider does not affect which date is focused when opening the\noverlay. Use `initialPosition` property to provide a selectable date.\n\nWhile a returned `Promise` is pending, the dates it covers are not disabled yet and render with\nthe `loading` part. If the function throws or rejects, corresponding dates are requested again\nthe next time the user navigates.\n\nThe provider is used for validation also when the overlay is closed. Date is considered valid\nwhile the provider is pending, and is re-validated again after the metadata is loaded.\n\nKeep a stable reference to the function: assigning a new one clears the cache and re-fetches\nvisible range. Call `clearCache()` to re-fetch when the data behind the same function changed.",
2324
+ "attribute": "date-metadata-provider",
1866
2325
  "inheritedFrom": {
1867
- "name": "TabindexMixin",
1868
- "package": "@vaadin/a11y-base/src/tabindex-mixin.js"
2326
+ "name": "DatePickerMixin",
2327
+ "module": "src/vaadin-date-picker-mixin.js"
1869
2328
  }
1870
2329
  },
1871
2330
  {
1872
2331
  "kind": "field",
1873
- "name": "disabledDatesProvider",
2332
+ "name": "disabled",
1874
2333
  "privacy": "public",
1875
2334
  "type": {
1876
- "text": "function(DatePickerDateRange): Array<DatePickerDate> | Promise<Array<DatePickerDate>> | undefined"
2335
+ "text": "boolean"
1877
2336
  },
1878
- "description": "A batch function that is consulted for a range of dates that the calendar is about\nto render. It receives a `DatePickerDateRange` object (`{ start, end }` of\n`DatePickerDate`) and returns, or resolves with, an array of `DatePickerDate` objects\nthat should be disabled within that range.\n\nUnlike `isDateDisabled`, which is called once per date, this function is called for a\nrange of dates at a time, and again as the calendar renders further dates. The size of\nthe range is decided by the calendar and may span multiple months. It may return a\n`Promise`, in which case the affected dates render in a non-selectable pending state\nuntil it resolves.\n\nDates disabled by this function are combined with `min`, `max` and `isDateDisabled`:\na date is disabled if it is out of the min/max range, or `isDateDisabled` returns\n`true`, or it is included in this function's result.\n\nKeep a stable reference to the function. Assigning a new function resets the internal\ncache and re-fetches every visible range.",
1879
- "attribute": "disabled-dates-provider",
2337
+ "description": "If true, the user cannot interact with this element.",
2338
+ "attribute": "disabled",
1880
2339
  "inheritedFrom": {
1881
- "name": "DatePickerMixin",
1882
- "module": "src/vaadin-date-picker-mixin.js"
2340
+ "name": "TabindexMixin",
2341
+ "package": "@vaadin/a11y-base/src/tabindex-mixin.js"
1883
2342
  }
1884
2343
  },
1885
2344
  {
@@ -1917,7 +2376,7 @@
1917
2376
  "type": {
1918
2377
  "text": "Object"
1919
2378
  },
1920
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n // An array with the full names of months starting\n // with January.\n monthNames: [\n 'January', 'February', 'March', 'April', 'May',\n 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ],\n\n // An array of weekday names starting with Sunday. Used\n // in screen reader announcements.\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n\n // An array of short weekday names starting with Sunday.\n // Displayed in the calendar.\n weekdaysShort: [\n 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'\n ],\n\n // An integer indicating the first day of the week\n // (0 = Sunday, 1 = Monday, etc.).\n firstDayOfWeek: 0,\n\n // Translation of the Today shortcut button text.\n today: 'Today',\n\n // Translation of the Cancel button text.\n cancel: 'Cancel',\n\n // Used for adjusting the year value when parsing dates with short years.\n // The year values between 0 and 99 are evaluated and adjusted.\n // Example: for a referenceDate of 1970-10-30;\n // dateToBeParsed: 40-10-30, result: 1940-10-30\n // dateToBeParsed: 80-10-30, result: 1980-10-30\n // dateToBeParsed: 10-10-30, result: 2010-10-30\n // Supported date format: ISO 8601 `\"YYYY-MM-DD\"` (default)\n // The default value is the current date.\n referenceDate: '',\n\n // A function to format given `Object` as\n // date string. Object is in the format `{ day: ..., month: ..., year: ... }`\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n formatDate: d => {\n // returns a string representation of the given\n // object in 'MM/DD/YYYY' -format\n },\n\n // A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n // Must properly parse (at least) text formatted by `formatDate`.\n // Setting the property to null will disable keyboard input feature.\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n parseDate: text => {\n // Parses a string in 'MM/DD/YY', 'MM/DD' or 'DD' -format to\n // an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n }\n\n // A function to format given `monthName` and\n // `fullYear` integer as calendar title string.\n formatTitle: (monthName, fullYear) => {\n return monthName + ' ' + fullYear;\n }\n}\n```",
2379
+ "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n // An array with the full names of months starting\n // with January.\n monthNames: [\n 'January', 'February', 'March', 'April', 'May',\n 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ],\n\n // An array of weekday names starting with Sunday. Used\n // in screen reader announcements.\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n\n // An array of short weekday names starting with Sunday.\n // Displayed in the calendar.\n weekdaysShort: [\n 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'\n ],\n\n // An integer indicating the first day of the week\n // (0 = Sunday, 1 = Monday, etc.).\n firstDayOfWeek: 0,\n\n // Translation of the Today shortcut button text.\n today: 'Today',\n\n // Translation of the Cancel button text.\n cancel: 'Cancel',\n\n // Accessible name of the overlay content, announced by screen readers\n // when the overlay opens.\n dialogAccessibleName: 'Calendar',\n\n // Used for adjusting the year value when parsing dates with short years.\n // The year values between 0 and 99 are evaluated and adjusted.\n // Example: for a referenceDate of 1970-10-30;\n // dateToBeParsed: 40-10-30, result: 1940-10-30\n // dateToBeParsed: 80-10-30, result: 1980-10-30\n // dateToBeParsed: 10-10-30, result: 2010-10-30\n // Supported date format: ISO 8601 `\"YYYY-MM-DD\"` (default)\n // The default value is the current date.\n referenceDate: '',\n\n // A function to format given `Object` as\n // date string. Object is in the format `{ day: ..., month: ..., year: ... }`\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n formatDate: d => {\n // returns a string representation of the given\n // object in 'MM/DD/YYYY' -format\n },\n\n // A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n // Must properly parse (at least) text formatted by `formatDate`.\n // Setting the property to null will disable keyboard input feature.\n // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n parseDate: text => {\n // Parses a string in 'MM/DD/YY', 'MM/DD' or 'DD' -format to\n // an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n }\n\n // A function to format given `monthName` and\n // `fullYear` integer as calendar title string.\n formatTitle: (monthName, fullYear) => {\n return monthName + ' ' + fullYear;\n }\n}\n```",
1921
2380
  "attribute": "i18n",
1922
2381
  "inheritedFrom": {
1923
2382
  "name": "I18nMixin",
@@ -1959,7 +2418,7 @@
1959
2418
  "type": {
1960
2419
  "text": "function(DatePickerDate): boolean | undefined"
1961
2420
  },
1962
- "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.",
2421
+ "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.\n\nThe function is called once per date and has to answer synchronously. Use\n`dateMetadataProvider` when the answer has to be loaded first, or when dates also need\ncustom part names. A date is disabled when either of the two disables it.",
1963
2422
  "attribute": "is-date-disabled",
1964
2423
  "inheritedFrom": {
1965
2424
  "name": "DatePickerMixin",
@@ -2211,12 +2670,24 @@
2211
2670
  }
2212
2671
  ],
2213
2672
  "attributes": [
2673
+ {
2674
+ "name": "accessible-description-ref",
2675
+ "type": {
2676
+ "text": "string"
2677
+ },
2678
+ "description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
2679
+ "fieldName": "accessibleDescriptionRef",
2680
+ "inheritedFrom": {
2681
+ "name": "FieldMixin",
2682
+ "package": "@vaadin/field-base/src/field-mixin.js"
2683
+ }
2684
+ },
2214
2685
  {
2215
2686
  "name": "accessible-name",
2216
2687
  "type": {
2217
2688
  "text": "string"
2218
2689
  },
2219
- "description": "String used to label the component to screen reader users.",
2690
+ "description": "String used to label the component for screen reader users.",
2220
2691
  "fieldName": "accessibleName",
2221
2692
  "inheritedFrom": {
2222
2693
  "name": "FieldMixin",
@@ -2228,7 +2699,7 @@
2228
2699
  "type": {
2229
2700
  "text": "string"
2230
2701
  },
2231
- "description": "Id of the element used as label of the component to screen reader users.",
2702
+ "description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
2232
2703
  "fieldName": "accessibleNameRef",
2233
2704
  "inheritedFrom": {
2234
2705
  "name": "FieldMixin",
@@ -2288,13 +2759,25 @@
2288
2759
  "type": {
2289
2760
  "text": "boolean"
2290
2761
  },
2291
- "description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
2762
+ "description": "Set to true to display the clear icon which clears the input.\nThis also enables clearing the input when pressing Esc key.",
2292
2763
  "fieldName": "clearButtonVisible",
2293
2764
  "inheritedFrom": {
2294
2765
  "name": "ClearButtonMixin",
2295
2766
  "package": "@vaadin/field-base/src/clear-button-mixin.js"
2296
2767
  }
2297
2768
  },
2769
+ {
2770
+ "name": "date-metadata-provider",
2771
+ "type": {
2772
+ "text": "DatePickerDateMetadataProvider | null | undefined"
2773
+ },
2774
+ "description": "A function that provides metadata for the dates the calendar is about to render: whether they\nare disabled, and CSS `part` names for styling from outside using the `::part()` selector.\nUnlike `isDateDisabled`, which is called once per date, the metadata provider is called for\na range of dates at a time, and again as the calendar renders further dates.\n\nIt receives a `DatePickerDateRange` and returns an array of `DatePickerDateMetadata` objects\nfor the dates in that range that have metadata. It can return a `Promise` to load the metadata\nasynchronously, and `null` or `undefined` when no date in the range has metadata.\n\nThe returned array has the following structure:\n\n```js\n[\n // The date is an ISO 8601 string.\n { date: '2026-01-01', disabled: true },\n\n // Adds a custom part name to the date.\n { date: '2026-01-02', part: 'busy' },\n]\n```\n\nA date is disabled if its metadata marks it disabled, or `isDateDisabled` returns `true`, or\nit is outside `min` and `max`. Disabled dates are not selectable, and typing a disabled date in\nthe field makes it invalid. The provider does not affect which date is focused when opening the\noverlay. Use `initialPosition` property to provide a selectable date.\n\nWhile a returned `Promise` is pending, the dates it covers are not disabled yet and render with\nthe `loading` part. If the function throws or rejects, corresponding dates are requested again\nthe next time the user navigates.\n\nThe provider is used for validation also when the overlay is closed. Date is considered valid\nwhile the provider is pending, and is re-validated again after the metadata is loaded.\n\nKeep a stable reference to the function: assigning a new one clears the cache and re-fetches\nvisible range. Call `clearCache()` to re-fetch when the data behind the same function changed.",
2775
+ "fieldName": "dateMetadataProvider",
2776
+ "inheritedFrom": {
2777
+ "name": "DatePickerMixin",
2778
+ "module": "src/vaadin-date-picker-mixin.js"
2779
+ }
2780
+ },
2298
2781
  {
2299
2782
  "name": "disabled",
2300
2783
  "type": {
@@ -2372,7 +2855,7 @@
2372
2855
  "type": {
2373
2856
  "text": "function(DatePickerDate): boolean | undefined"
2374
2857
  },
2375
- "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.",
2858
+ "description": "A function to be used to determine whether the user can select a given date.\nReceives a `DatePickerDate` object of the date to be selected and should return a\nboolean.\n\nThe function is called once per date and has to answer synchronously. Use\n`dateMetadataProvider` when the answer has to be loaded first, or when dates also need\ncustom part names. A date is disabled when either of the two disables it.",
2376
2859
  "fieldName": "isDateDisabled",
2377
2860
  "inheritedFrom": {
2378
2861
  "name": "DatePickerMixin",
@@ -2499,6 +2982,13 @@
2499
2982
  "module": "src/vaadin-date-picker-mixin.js"
2500
2983
  }
2501
2984
  },
2985
+ {
2986
+ "type": {
2987
+ "text": "string"
2988
+ },
2989
+ "description": "The theme variants to apply to the component.",
2990
+ "name": "theme"
2991
+ },
2502
2992
  {
2503
2993
  "name": "title",
2504
2994
  "type": {
@@ -2569,145 +3059,6 @@
2569
3059
  }
2570
3060
  ]
2571
3061
  },
2572
- {
2573
- "kind": "javascript-module",
2574
- "path": "src/vaadin-disabled-dates-controller.js",
2575
- "declarations": [
2576
- {
2577
- "kind": "class",
2578
- "description": "A reactive controller that resolves the dates disabled by the date-picker's\n`disabledDatesProvider`. It calls the provider once for a range of months\n(never one date at a time), caches the resolved months so scrolling back and\nforth does not re-fetch them, and prefetches a buffer of months around the\nrequested range. While any request is in flight, #loading is `true`\nso the overlay can show a spinner.\n\nThe provider may return an array synchronously or a `Promise`, so results\nfrom a server (Flow) or a remote availability service can be awaited.",
2579
- "name": "DisabledDatesController",
2580
- "members": [
2581
- {
2582
- "kind": "method",
2583
- "name": "ensureRangeLoaded",
2584
- "parameters": [
2585
- {
2586
- "name": "startDate",
2587
- "type": {
2588
- "text": "Date"
2589
- }
2590
- },
2591
- {
2592
- "name": "endDate",
2593
- "type": {
2594
- "text": "Date"
2595
- }
2596
- }
2597
- ],
2598
- "description": "Ensures the provider has been consulted for the inclusive range between the\ngiven dates, expanded by a prefetch buffer of months on each side. Months\nthat are already loaded or in flight are skipped, and consecutive missing\nmonths are grouped into a single provider call."
2599
- },
2600
- {
2601
- "kind": "field",
2602
- "name": "host",
2603
- "default": "host"
2604
- },
2605
- {
2606
- "kind": "method",
2607
- "name": "hostDisconnected"
2608
- },
2609
- {
2610
- "kind": "method",
2611
- "name": "isDateBlocked",
2612
- "parameters": [
2613
- {
2614
- "name": "date",
2615
- "type": {
2616
- "text": "Date"
2617
- }
2618
- }
2619
- ],
2620
- "description": "Whether the given date cannot be selected yet: it is disabled by the\nprovider, or its month has not been resolved so its state is still unknown.\nReturns `false` when no provider is set. Used to block selection and to\nrender dates as non-selectable while their month is loading.",
2621
- "return": {
2622
- "type": {
2623
- "text": "boolean"
2624
- }
2625
- }
2626
- },
2627
- {
2628
- "kind": "method",
2629
- "name": "isDateDisabled",
2630
- "parameters": [
2631
- {
2632
- "name": "date",
2633
- "type": {
2634
- "text": "Date"
2635
- }
2636
- }
2637
- ],
2638
- "description": "Whether the given date is disabled by the provider. Only returns `true` for\ndates in an already-resolved month.",
2639
- "return": {
2640
- "type": {
2641
- "text": "boolean"
2642
- }
2643
- }
2644
- },
2645
- {
2646
- "kind": "method",
2647
- "name": "isMonthLoaded",
2648
- "parameters": [
2649
- {
2650
- "name": "date",
2651
- "type": {
2652
- "text": "Date"
2653
- }
2654
- }
2655
- ],
2656
- "description": "Whether the month containing the given date has been fully resolved.",
2657
- "return": {
2658
- "type": {
2659
- "text": "boolean"
2660
- }
2661
- }
2662
- },
2663
- {
2664
- "kind": "field",
2665
- "name": "loading",
2666
- "description": "Whether any month range is currently being fetched.",
2667
- "return": {
2668
- "type": {
2669
- "text": "boolean"
2670
- }
2671
- },
2672
- "readonly": true
2673
- },
2674
- {
2675
- "kind": "field",
2676
- "name": "provider",
2677
- "type": {
2678
- "text": "null"
2679
- },
2680
- "default": "null"
2681
- },
2682
- {
2683
- "kind": "method",
2684
- "name": "reset",
2685
- "description": "Clears the cache and invalidates any in-flight requests."
2686
- },
2687
- {
2688
- "kind": "method",
2689
- "name": "setProvider",
2690
- "parameters": [
2691
- {
2692
- "name": "provider"
2693
- }
2694
- ],
2695
- "description": "Sets the provider function and clears the cache. Passing the same provider\nagain is a no-op, so the cache survives unrelated re-renders — callers\nshould therefore keep a stable provider reference rather than passing a new\nfunction on every update, which would otherwise reset the cache and\nre-fetch every visible range."
2696
- }
2697
- ]
2698
- }
2699
- ],
2700
- "exports": [
2701
- {
2702
- "kind": "js",
2703
- "name": "DisabledDatesController",
2704
- "declaration": {
2705
- "name": "DisabledDatesController",
2706
- "module": "src/vaadin-disabled-dates-controller.js"
2707
- }
2708
- }
2709
- ]
2710
- },
2711
3062
  {
2712
3063
  "kind": "javascript-module",
2713
3064
  "path": "src/vaadin-month-calendar-mixin.js",