@aurodesignsystem-dev/auro-formkit 0.0.0-pr1448.0 → 0.0.0-pr1451.1
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/components/checkbox/demo/api.md +201 -221
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.md +21 -23
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/keyboard-behavior.md +39 -0
- package/components/checkbox/demo/readme.md +23 -35
- package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -6
- package/components/checkbox/dist/auro-checkbox.d.ts +8 -8
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/README.md +13 -3
- package/components/combobox/demo/accessibility.html +57 -0
- package/components/combobox/demo/accessibility.md +77 -0
- package/components/combobox/demo/api.html +24 -0
- package/components/combobox/demo/api.md +1613 -1685
- package/components/combobox/demo/api.min.js +15 -21
- package/components/combobox/demo/design.html +83 -0
- package/components/combobox/demo/design.md +283 -0
- package/components/combobox/demo/index.html +49 -16
- package/components/combobox/demo/index.js +3 -2
- package/components/combobox/demo/index.md +861 -185
- package/components/combobox/demo/index.min.js +41 -22
- package/components/combobox/demo/install.html +84 -0
- package/components/combobox/demo/install.js +24 -0
- package/components/combobox/demo/install.md +100 -0
- package/components/combobox/demo/install.min.js +17991 -0
- package/components/combobox/demo/{keyboardBehavior.html → keyboard-behavior.html} +2 -1
- package/components/combobox/demo/keyboard-behavior.md +276 -0
- package/components/combobox/demo/layout.md +112 -0
- package/components/combobox/demo/readme.html +25 -1
- package/components/combobox/demo/readme.md +50 -52
- package/components/combobox/demo/styles.css +141 -0
- package/components/combobox/demo/voiceover.html +66 -0
- package/components/combobox/demo/voiceover.md +118 -0
- package/components/combobox/dist/auro-combobox.d.ts +36 -36
- package/components/combobox/dist/index.js +12 -17
- package/components/combobox/dist/registered.js +12 -17
- package/components/counter/demo/api.md +751 -819
- package/components/counter/demo/api.min.js +2 -2
- package/components/counter/demo/index.md +35 -39
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/demo/keyboard-behavior.md +127 -0
- package/components/counter/demo/readme.md +39 -51
- package/components/counter/dist/auro-counter-group.d.ts +2 -2
- package/components/counter/dist/auro-counter.d.ts +10 -10
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/api.md +827 -931
- package/components/datepicker/demo/api.min.js +4 -4
- package/components/datepicker/demo/index.md +79 -87
- package/components/datepicker/demo/index.min.js +4 -4
- package/components/datepicker/demo/keyboard-behavior.md +19 -0
- package/components/datepicker/demo/readme.md +19 -31
- package/components/datepicker/dist/index.js +4 -4
- package/components/datepicker/dist/registered.js +4 -4
- package/components/datepicker/dist/{auro-calendar-cell.d.ts → src/auro-calendar-cell.d.ts} +2 -2
- package/components/datepicker/dist/{auro-datepicker.d.ts → src/auro-datepicker.d.ts} +13 -13
- package/components/datepicker/dist/{utilities.d.ts → src/utilities.d.ts} +4 -4
- package/components/datepicker/dist/{utilitiesCalendar.d.ts → src/utilitiesCalendar.d.ts} +3 -3
- package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +2 -2
- package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker.d.ts +1 -1
- package/components/dropdown/demo/api.md +795 -851
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.md +145 -155
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/demo/keyboard-behavior.md +72 -0
- package/components/dropdown/demo/readme.md +39 -51
- package/components/dropdown/dist/auro-dropdown.d.ts +22 -22
- package/components/dropdown/dist/auro-dropdownBib.d.ts +3 -3
- package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/api.md +173 -179
- package/components/form/demo/api.min.js +27 -33
- package/components/form/demo/index.md +27 -33
- package/components/form/demo/index.min.js +27 -33
- package/components/form/demo/keyboard-behavior.md +38 -0
- package/components/form/demo/readme.md +14 -28
- package/components/input/demo/api.md +572 -664
- package/components/input/demo/api.min.js +2 -2
- package/components/input/demo/index.md +93 -99
- package/components/input/demo/index.min.js +2 -2
- package/components/input/demo/keyboard-behavior.md +25 -0
- package/components/input/demo/readme.md +17 -29
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +29 -29
- package/components/input/dist/index.js +2 -2
- package/components/input/dist/registered.js +2 -2
- package/components/menu/demo/api.md +745 -789
- package/components/menu/demo/api.min.js +3 -4
- package/components/menu/demo/index.md +35 -37
- package/components/menu/demo/index.min.js +3 -4
- package/components/menu/demo/keyboard-behavior.md +18 -0
- package/components/menu/demo/readme.md +23 -35
- package/components/menu/dist/auro-menu-utils.d.ts +1 -1
- package/components/menu/dist/auro-menu.context.d.ts +3 -3
- package/components/menu/dist/auro-menu.d.ts +5 -5
- package/components/menu/dist/auro-menuoption.d.ts +6 -6
- package/components/menu/dist/index.js +3 -4
- package/components/menu/dist/registered.js +3 -4
- package/components/radio/demo/api.md +318 -350
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.md +25 -29
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/keyboard-behavior.md +72 -0
- package/components/radio/demo/readme.md +21 -33
- package/components/radio/dist/auro-radio-group.d.ts +9 -9
- package/components/radio/dist/auro-radio.d.ts +8 -8
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/README.md +12 -1
- package/components/select/demo/accessibility.html +65 -0
- package/components/select/demo/accessibility.md +76 -0
- package/components/select/demo/api.md +1713 -1793
- package/components/select/demo/api.min.js +5 -6
- package/components/select/demo/index.html +247 -37
- package/components/select/demo/index.md +225 -345
- package/components/select/demo/index.min.js +5 -6
- package/components/select/demo/keyboard-behavior.md +39 -0
- package/components/select/demo/layout.html +59 -0
- package/components/select/demo/layout.md +299 -0
- package/components/select/demo/readme.md +45 -46
- package/components/select/demo/voiceover.html +65 -0
- package/components/select/demo/voiceover.md +183 -0
- package/components/select/dist/auro-select.d.ts +11 -11
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +13 -11
- package/package.json +26 -26
- package/components/checkbox/demo/keyboardBehavior.md +0 -0
- package/components/combobox/demo/keyboardBehavior.md +0 -281
- package/components/counter/demo/keyboardBehavior.md +0 -127
- package/components/datepicker/demo/keyboardBehavior.md +0 -19
- package/components/dropdown/demo/keyboardBehavior.md +0 -77
- package/components/form/demo/keyboardBehavior.md +0 -0
- package/components/input/demo/keyboardBehavior.md +0 -0
- package/components/menu/demo/keyboardBehavior.md +0 -0
- package/components/radio/demo/keyboardBehavior.md +0 -0
- package/components/select/demo/keyboardBehavior.md +0 -245
- /package/components/datepicker/dist/{auro-calendar-month.d.ts → src/auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{auro-calendar.d.ts → src/auro-calendar.d.ts} +0 -0
- /package/components/datepicker/dist/{buttonVersion.d.ts → src/buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{datepickerKeyboardStrategy.d.ts → src/datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{iconVersion.d.ts → src/iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/components/datepicker/dist/{popoverVersion.d.ts → src/popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{utilitiesCalendarRender.d.ts → src/utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
|
@@ -110,29 +110,27 @@ The `auro-datepicker` component provides users with a way to select a date or da
|
|
|
110
110
|
## Basic
|
|
111
111
|
|
|
112
112
|
<div class="exampleWrapper">
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
113
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
114
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
115
|
+
<auro-datepicker>
|
|
116
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
117
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
118
|
+
<span slot="fromLabel">Choose a date</span>
|
|
119
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
120
|
+
</auro-datepicker>
|
|
121
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
122
122
|
</div>
|
|
123
123
|
<auro-accordion alignRight>
|
|
124
|
-
|
|
124
|
+
<span slot="trigger">See code</span>
|
|
125
125
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
126
126
|
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
</auro-datepicker>
|
|
135
|
-
```
|
|
128
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker>
|
|
129
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
130
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
131
|
+
<span slot="fromLabel">Choose a date</span>
|
|
132
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
133
|
+
</auro-datepicker></code></pre>
|
|
136
134
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
137
135
|
</auro-accordion>
|
|
138
136
|
|
|
@@ -141,33 +139,31 @@ The `auro-datepicker` component provides users with a way to select a date or da
|
|
|
141
139
|
The datepicker can also be used to select a range between two dates by adding the `range` attribute.
|
|
142
140
|
|
|
143
141
|
<div class="exampleWrapper">
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
142
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/range.html) -->
|
|
143
|
+
<!-- The below content is automatically added from ./../apiExamples/range.html -->
|
|
144
|
+
<auro-datepicker range>
|
|
145
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
146
|
+
<span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
|
|
147
|
+
<span slot="fromLabel">Departure</span>
|
|
148
|
+
<span slot="toLabel">Return</span>
|
|
149
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
150
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
151
|
+
</auro-datepicker>
|
|
152
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
155
153
|
</div>
|
|
156
154
|
<auro-accordion alignRight>
|
|
157
|
-
|
|
155
|
+
<span slot="trigger">See code</span>
|
|
158
156
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/range.html) -->
|
|
159
157
|
<!-- The below code snippet is automatically added from ./../apiExamples/range.html -->
|
|
160
158
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
</auro-datepicker>
|
|
170
|
-
```
|
|
159
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker range>
|
|
160
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
161
|
+
<span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
|
|
162
|
+
<span slot="fromLabel">Departure</span>
|
|
163
|
+
<span slot="toLabel">Return</span>
|
|
164
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
165
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
166
|
+
</auro-datepicker></code></pre>
|
|
171
167
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
172
168
|
</auro-accordion>
|
|
173
169
|
|
|
@@ -178,57 +174,53 @@ The datepicker can also be used to select a range between two dates by adding th
|
|
|
178
174
|
Use `appearance="inverse"` to display the datepicker on dark backgrounds.
|
|
179
175
|
|
|
180
176
|
<div class="exampleWrapper--ondark">
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
177
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
|
|
178
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
179
|
+
<auro-datepicker appearance="inverse">
|
|
180
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
181
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
182
|
+
<span slot="fromLabel">Choose a date</span>
|
|
183
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
184
|
+
</auro-datepicker>
|
|
185
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
190
186
|
</div>
|
|
191
187
|
<auro-accordion alignRight>
|
|
192
|
-
|
|
188
|
+
<span slot="trigger">See code</span>
|
|
193
189
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/appearance-inverse.html) -->
|
|
194
190
|
<!-- The below code snippet is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
195
191
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
</auro-datepicker>
|
|
203
|
-
```
|
|
192
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker appearance="inverse">
|
|
193
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
194
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
195
|
+
<span slot="fromLabel">Choose a date</span>
|
|
196
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
197
|
+
</auro-datepicker></code></pre>
|
|
204
198
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
205
199
|
</auro-accordion>
|
|
206
200
|
<div class="exampleWrapper--ondark">
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
201
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-range.html) -->
|
|
202
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-range.html -->
|
|
203
|
+
<auro-datepicker appearance="inverse" range>
|
|
204
|
+
<span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
|
|
205
|
+
<span slot="fromLabel">Departure</span>
|
|
206
|
+
<span slot="toLabel">Return</span>
|
|
207
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
208
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
209
|
+
</auro-datepicker>
|
|
210
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
217
211
|
</div>
|
|
218
212
|
<auro-accordion alignRight>
|
|
219
|
-
|
|
213
|
+
<span slot="trigger">See code</span>
|
|
220
214
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/appearance-inverse-range.html) -->
|
|
221
215
|
<!-- The below code snippet is automatically added from ./../apiExamples/appearance-inverse-range.html -->
|
|
222
216
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
</auro-datepicker>
|
|
231
|
-
```
|
|
217
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker appearance="inverse" range>
|
|
218
|
+
<span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
|
|
219
|
+
<span slot="fromLabel">Departure</span>
|
|
220
|
+
<span slot="toLabel">Return</span>
|
|
221
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
222
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
223
|
+
</auro-datepicker></code></pre>
|
|
232
224
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
233
225
|
</auro-accordion>
|
|
234
226
|
|
|
@@ -243,77 +235,75 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
|
|
|
243
235
|
- `shift` when enabled, adjusts the bib position when it would overflow the viewport boundaries, ensuring it remains visible.
|
|
244
236
|
|
|
245
237
|
<div class="exampleWrapper">
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
238
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/floater-config.html) -->
|
|
239
|
+
<!-- The below content is automatically added from ./../apiExamples/floater-config.html -->
|
|
240
|
+
<div style="width: 400px">
|
|
241
|
+
<auro-datepicker offset="20" placement="bottom-start" noFlip>
|
|
242
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
243
|
+
<span slot="fromLabel">bottom-start with 20px offset and noFlip</span>
|
|
244
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
245
|
+
</auro-datepicker>
|
|
246
|
+
<br/>
|
|
247
|
+
<auro-datepicker offset="20" placement="bottom-start">
|
|
248
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
249
|
+
<span slot="fromLabel">bottom-start with 20px offset and flip</span>
|
|
250
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
251
|
+
</auro-datepicker>
|
|
252
|
+
<br/>
|
|
253
|
+
<auro-datepicker offset="20" placement="right" autoPlacement noFlip>
|
|
254
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
255
|
+
<span slot="fromLabel">right with 20px offset, noFlip and autoPlacement</span>
|
|
256
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
257
|
+
</auro-datepicker>
|
|
258
|
+
</div>
|
|
259
|
+
<div style="width: 600px; padding-top: 1em;">
|
|
260
|
+
<p>Range bottom-start with 20px offset, noFlip and shift enabled</p>
|
|
261
|
+
<auro-datepicker range offset="20" placement="bottom-start" shift noFlip minDate="07/08/2025">
|
|
262
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
263
|
+
<span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
|
|
264
|
+
<span slot="fromLabel">Departure</span>
|
|
265
|
+
<span slot="toLabel">Return</span>
|
|
266
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
267
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
268
|
+
</auro-datepicker>
|
|
269
|
+
</div>
|
|
270
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
279
271
|
</div>
|
|
280
272
|
<auro-accordion alignRight>
|
|
281
|
-
|
|
273
|
+
<span slot="trigger">See code</span>
|
|
282
274
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/floater-config.html) -->
|
|
283
275
|
<!-- The below code snippet is automatically added from ./../apiExamples/floater-config.html -->
|
|
284
276
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
</div>
|
|
316
|
-
```
|
|
277
|
+
<pre class="language-html"><code class="language-html"><div style="width: 400px">
|
|
278
|
+
<auro-datepicker offset="20" placement="bottom-start" noFlip>
|
|
279
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
280
|
+
<span slot="fromLabel">bottom-start with 20px offset and noFlip</span>
|
|
281
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
282
|
+
</auro-datepicker>
|
|
283
|
+
<br/>
|
|
284
|
+
<auro-datepicker offset="20" placement="bottom-start">
|
|
285
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
286
|
+
<span slot="fromLabel">bottom-start with 20px offset and flip</span>
|
|
287
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
288
|
+
</auro-datepicker>
|
|
289
|
+
<br/>
|
|
290
|
+
<auro-datepicker offset="20" placement="right" autoPlacement noFlip>
|
|
291
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
292
|
+
<span slot="fromLabel">right with 20px offset, noFlip and autoPlacement</span>
|
|
293
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
294
|
+
</auro-datepicker>
|
|
295
|
+
</div>
|
|
296
|
+
<div style="width: 600px; padding-top: 1em;">
|
|
297
|
+
<p>Range bottom-start with 20px offset, noFlip and shift enabled</p>
|
|
298
|
+
<auro-datepicker range offset="20" placement="bottom-start" shift noFlip minDate="07/08/2025">
|
|
299
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
300
|
+
<span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
|
|
301
|
+
<span slot="fromLabel">Departure</span>
|
|
302
|
+
<span slot="toLabel">Return</span>
|
|
303
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
304
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
305
|
+
</auro-datepicker>
|
|
306
|
+
</div></code></pre>
|
|
317
307
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
318
308
|
</auro-accordion>
|
|
319
309
|
|
|
@@ -330,27 +320,25 @@ In <strong>desktop</strong>, the calendar month navigation will be restricted by
|
|
|
330
320
|
Note: This does not restrict setting a value outside of those date constraints. These properties _only_ define which months can be rendered in the calendar. A user may still type any date into the input field. If actual value selection restrictions are needed, see the `minDate` and `maxDate` properties which may be used standalone, or in conjunction with `calendarStartDate` and `calendarEndDate`.
|
|
331
321
|
|
|
332
322
|
<div class="exampleWrapper">
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
323
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/calendar-start-and-end-date.html) -->
|
|
324
|
+
<!-- The below content is automatically added from ./../apiExamples/calendar-start-and-end-date.html -->
|
|
325
|
+
<auro-datepicker calendarStartDate="01/01/2022" calendarEndDate="06/01/2022">
|
|
326
|
+
<span slot="bib.fullscreen.headline">calendarStartDate & calendarEndDate Example</span>
|
|
327
|
+
<span slot="fromLabel">Choose a date</span>
|
|
328
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
329
|
+
</auro-datepicker>
|
|
330
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
341
331
|
</div>
|
|
342
332
|
<auro-accordion alignRight>
|
|
343
|
-
|
|
333
|
+
<span slot="trigger">See code</span>
|
|
344
334
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/calendar-start-and-end-date.html) -->
|
|
345
335
|
<!-- The below code snippet is automatically added from ./../apiExamples/calendar-start-and-end-date.html -->
|
|
346
336
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
</auro-datepicker>
|
|
353
|
-
```
|
|
337
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker calendarStartDate="01/01/2022" calendarEndDate="06/01/2022">
|
|
338
|
+
<span slot="bib.fullscreen.headline">calendarStartDate & calendarEndDate Example</span>
|
|
339
|
+
<span slot="fromLabel">Choose a date</span>
|
|
340
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
341
|
+
</auro-datepicker></code></pre>
|
|
354
342
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
355
343
|
</auro-accordion>
|
|
356
344
|
|
|
@@ -363,27 +351,25 @@ In <strong>desktop</strong> layout, the first month actually rendered will be th
|
|
|
363
351
|
In <strong>mobile</strong> layout, upon first opening the bib, the vertical list of months will scroll (with no animation) to the month defined by the `calendarFocusDate`. If the user scrolls the list to a different position, the scroll position will remain where the user left off when they close and reopen the bib. If the `calendarFocusDate` is changed, the list will scroll to the new dates month. If `calendarFocusDate` is undefined, the list will start at the top most scroll position.
|
|
364
352
|
|
|
365
353
|
<div class="exampleWrapper">
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
354
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/calendar-focus-date.html) -->
|
|
355
|
+
<!-- The below content is automatically added from ./../apiExamples/calendar-focus-date.html -->
|
|
356
|
+
<auro-datepicker calendarStartDate="01/01/2022" calendarEndDate="12/01/2023" calendarFocusDate="11/01/2022">
|
|
357
|
+
<span slot="bib.fullscreen.headline">calendarFocusDate Example</span>
|
|
358
|
+
<span slot="fromLabel">Choose a date</span>
|
|
359
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
360
|
+
</auro-datepicker>
|
|
361
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
374
362
|
</div>
|
|
375
363
|
<auro-accordion alignRight>
|
|
376
|
-
|
|
364
|
+
<span slot="trigger">See code</span>
|
|
377
365
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/calendar-focus-date.html) -->
|
|
378
366
|
<!-- The below code snippet is automatically added from ./../apiExamples/calendar-focus-date.html -->
|
|
379
367
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
</auro-datepicker>
|
|
386
|
-
```
|
|
368
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker calendarStartDate="01/01/2022" calendarEndDate="12/01/2023" calendarFocusDate="11/01/2022">
|
|
369
|
+
<span slot="bib.fullscreen.headline">calendarFocusDate Example</span>
|
|
370
|
+
<span slot="fromLabel">Choose a date</span>
|
|
371
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
372
|
+
</auro-datepicker></code></pre>
|
|
387
373
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
388
374
|
</auro-accordion>
|
|
389
375
|
|
|
@@ -392,27 +378,25 @@ In <strong>mobile</strong> layout, upon first opening the bib, the vertical list
|
|
|
392
378
|
The `centralDate` attribute can be used to force the calendar to navigate to a specific month. WARNING: Do not set the `centralDate` attribute on blur.
|
|
393
379
|
|
|
394
380
|
<div class="exampleWrapper">
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
381
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/central-date.html) -->
|
|
382
|
+
<!-- The below content is automatically added from ./../apiExamples/central-date.html -->
|
|
383
|
+
<auro-datepicker centralDate="06/16/1980">
|
|
384
|
+
<span slot="bib.fullscreen.headline">centralDate Example</span>
|
|
385
|
+
<span slot="fromLabel">Choose a date</span>
|
|
386
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
387
|
+
</auro-datepicker>
|
|
388
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
403
389
|
</div>
|
|
404
390
|
<auro-accordion alignRight>
|
|
405
|
-
|
|
391
|
+
<span slot="trigger">See code</span>
|
|
406
392
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/central-date.html) -->
|
|
407
393
|
<!-- The below code snippet is automatically added from ./../apiExamples/central-date.html -->
|
|
408
394
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
</auro-datepicker>
|
|
415
|
-
```
|
|
395
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker centralDate="06/16/1980">
|
|
396
|
+
<span slot="bib.fullscreen.headline">centralDate Example</span>
|
|
397
|
+
<span slot="fromLabel">Choose a date</span>
|
|
398
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
399
|
+
</auro-datepicker></code></pre>
|
|
416
400
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
417
401
|
</auro-accordion>
|
|
418
402
|
|
|
@@ -421,25 +405,23 @@ The `centralDate` attribute can be used to force the calendar to navigate to a s
|
|
|
421
405
|
Set the `disabled` attribute to disable all interaction with the datepicker.
|
|
422
406
|
|
|
423
407
|
<div class="exampleWrapper">
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
408
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled.html) -->
|
|
409
|
+
<!-- The below content is automatically added from ./../apiExamples/disabled.html -->
|
|
410
|
+
<auro-datepicker disabled>
|
|
411
|
+
<span slot="fromLabel">Choose a date</span>
|
|
412
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
413
|
+
</auro-datepicker>
|
|
414
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
431
415
|
</div>
|
|
432
416
|
<auro-accordion alignRight>
|
|
433
|
-
|
|
417
|
+
<span slot="trigger">See code</span>
|
|
434
418
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled.html) -->
|
|
435
419
|
<!-- The below code snippet is automatically added from ./../apiExamples/disabled.html -->
|
|
436
420
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
</auro-datepicker>
|
|
442
|
-
```
|
|
421
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker disabled>
|
|
422
|
+
<span slot="fromLabel">Choose a date</span>
|
|
423
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
424
|
+
</auro-datepicker></code></pre>
|
|
443
425
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
444
426
|
</auro-accordion>
|
|
445
427
|
|
|
@@ -450,50 +432,46 @@ Use the `error` attribute to apply a persistent custom error that supersedes the
|
|
|
450
432
|
A custom error message can be set using the `error` attribute, or it can be used in conjuction with the `setCustomValidityCustomError` attribute.
|
|
451
433
|
|
|
452
434
|
<div class="exampleWrapper">
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
435
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/error.html) -->
|
|
436
|
+
<!-- The below content is automatically added from ./../apiExamples/error.html -->
|
|
437
|
+
<auro-button id="undefinedValueExampleBtnAddError">Set Error</auro-button>
|
|
438
|
+
<auro-button id="undefinedValueExampleBtnRemoveError">Remove Error</auro-button>
|
|
439
|
+
<br />
|
|
440
|
+
<auro-datepicker error="Custom error message" id="errorExample">
|
|
441
|
+
<span slot="bib.fullscreen.headline">Error Example</span>
|
|
442
|
+
<span slot="fromLabel">Choose a date</span>
|
|
443
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
444
|
+
</auro-datepicker>
|
|
445
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
464
446
|
</div>
|
|
465
447
|
<auro-accordion alignRight>
|
|
466
|
-
|
|
448
|
+
<span slot="trigger">See code</span>
|
|
467
449
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error.html) -->
|
|
468
450
|
<!-- The below code snippet is automatically added from ./../apiExamples/error.html -->
|
|
469
451
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
</auro-datepicker>
|
|
479
|
-
```
|
|
452
|
+
<pre class="language-html"><code class="language-html"><auro-button id="undefinedValueExampleBtnAddError">Set Error</auro-button>
|
|
453
|
+
<auro-button id="undefinedValueExampleBtnRemoveError">Remove Error</auro-button>
|
|
454
|
+
<br />
|
|
455
|
+
<auro-datepicker error="Custom error message" id="errorExample">
|
|
456
|
+
<span slot="bib.fullscreen.headline">Error Example</span>
|
|
457
|
+
<span slot="fromLabel">Choose a date</span>
|
|
458
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
459
|
+
</auro-datepicker></code></pre>
|
|
480
460
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
481
461
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error.js) -->
|
|
482
462
|
<!-- The below code snippet is automatically added from ./../apiExamples/error.js -->
|
|
483
463
|
|
|
484
|
-
|
|
485
|
-
export function errorExample() {
|
|
464
|
+
<pre class="language-js"><code class="language-js">export function errorExample() {
|
|
486
465
|
const errorExample = document.querySelector('#errorExample');
|
|
487
|
-
|
|
488
|
-
document.querySelector('#undefinedValueExampleBtnAddError').addEventListener('click', ()
|
|
466
|
+
|
|
467
|
+
document.querySelector('#undefinedValueExampleBtnAddError').addEventListener('click', () => {
|
|
489
468
|
errorExample.error = 'Custom New Error';
|
|
490
469
|
})
|
|
491
|
-
|
|
492
|
-
document.querySelector('#undefinedValueExampleBtnRemoveError').addEventListener('click', ()
|
|
470
|
+
|
|
471
|
+
document.querySelector('#undefinedValueExampleBtnRemoveError').addEventListener('click', () => {
|
|
493
472
|
errorExample.removeAttribute('error');
|
|
494
473
|
})
|
|
495
|
-
}
|
|
496
|
-
```
|
|
474
|
+
}</code></pre>
|
|
497
475
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
498
476
|
</auro-accordion>
|
|
499
477
|
|
|
@@ -502,27 +480,25 @@ export function errorExample() {
|
|
|
502
480
|
The `format` attribute is used to define the date format used by the datepicker. The default value is `mm/dd/yyyy`.
|
|
503
481
|
|
|
504
482
|
<div class="exampleWrapper">
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
483
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/format.html) -->
|
|
484
|
+
<!-- The below content is automatically added from ./../apiExamples/format.html -->
|
|
485
|
+
<auro-datepicker format="yyyy/mm/dd">
|
|
486
|
+
<span slot="bib.fullscreen.headline">Format Headline</span>
|
|
487
|
+
<span slot="fromLabel">Choose a date</span>
|
|
488
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
489
|
+
</auro-datepicker>
|
|
490
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
513
491
|
</div>
|
|
514
492
|
<auro-accordion alignRight>
|
|
515
|
-
|
|
493
|
+
<span slot="trigger">See code</span>
|
|
516
494
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/format.html) -->
|
|
517
495
|
<!-- The below code snippet is automatically added from ./../apiExamples/format.html -->
|
|
518
496
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
</auro-datepicker>
|
|
525
|
-
```
|
|
497
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker format="yyyy/mm/dd">
|
|
498
|
+
<span slot="bib.fullscreen.headline">Format Headline</span>
|
|
499
|
+
<span slot="fromLabel">Choose a date</span>
|
|
500
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
501
|
+
</auro-datepicker></code></pre>
|
|
526
502
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
527
503
|
</auro-accordion>
|
|
528
504
|
|
|
@@ -537,29 +513,27 @@ Breakpoint token can be found [here](https://auro.alaskaair.com/getting-started/
|
|
|
537
513
|
To support fullcreen bib, setting `bib.fullscreen.headline` is **STRONGLY RECOMMENDED**.
|
|
538
514
|
|
|
539
515
|
<div class="exampleWrapper">
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
516
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/fullscreen-breakpoint.html) -->
|
|
517
|
+
<!-- The below content is automatically added from ./../apiExamples/fullscreen-breakpoint.html -->
|
|
518
|
+
<auro-datepicker fullscreenBreakpoint="lg">
|
|
519
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
520
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
521
|
+
<span slot="fromLabel">Choose a date</span>
|
|
522
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
523
|
+
</auro-datepicker>
|
|
524
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
549
525
|
</div>
|
|
550
526
|
<auro-accordion alignRight>
|
|
551
|
-
|
|
527
|
+
<span slot="trigger">See code</span>
|
|
552
528
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/fullscreen-breakpoint.html) -->
|
|
553
529
|
<!-- The below code snippet is automatically added from ./../apiExamples/fullscreen-breakpoint.html -->
|
|
554
530
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
</auro-datepicker>
|
|
562
|
-
```
|
|
531
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker fullscreenBreakpoint="lg">
|
|
532
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
533
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
534
|
+
<span slot="fromLabel">Choose a date</span>
|
|
535
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
536
|
+
</auro-datepicker></code></pre>
|
|
563
537
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
564
538
|
</auro-accordion>
|
|
565
539
|
|
|
@@ -568,27 +542,25 @@ To support fullcreen bib, setting `bib.fullscreen.headline` is **STRONGLY RECOMM
|
|
|
568
542
|
You can manually set the input mode for the input with the `inputmode` attribute.
|
|
569
543
|
|
|
570
544
|
<div class="exampleWrapper">
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
545
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/inputmode.html) -->
|
|
546
|
+
<!-- The below content is automatically added from ./../apiExamples/inputmode.html -->
|
|
547
|
+
<auro-datepicker inputmode="numeric">
|
|
548
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
549
|
+
<span slot="fromLabel">Choose a date</span>
|
|
550
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
551
|
+
</auro-datepicker>
|
|
552
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
579
553
|
</div>
|
|
580
554
|
<auro-accordion alignRight>
|
|
581
|
-
|
|
555
|
+
<span slot="trigger">See code</span>
|
|
582
556
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/inputmode.html) -->
|
|
583
557
|
<!-- The below code snippet is automatically added from ./../apiExamples/inputmode.html -->
|
|
584
558
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
</auro-datepicker>
|
|
591
|
-
```
|
|
559
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker inputmode="numeric">
|
|
560
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
561
|
+
<span slot="fromLabel">Choose a date</span>
|
|
562
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
563
|
+
</auro-datepicker></code></pre>
|
|
592
564
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
593
565
|
</auro-accordion>
|
|
594
566
|
|
|
@@ -597,27 +569,25 @@ You can manually set the input mode for the input with the `inputmode` attribute
|
|
|
597
569
|
To give a higher limit you can bind a date to the `maxDate` attribute. It is recommended to use the `setCustomValidityRangeOverflow` attribute to define an error message to display when validation fails the maximum date restriction.
|
|
598
570
|
|
|
599
571
|
<div class="exampleWrapper">
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
572
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/max-date.html) -->
|
|
573
|
+
<!-- The below content is automatically added from ./../apiExamples/max-date.html -->
|
|
574
|
+
<auro-datepicker maxDate="03/25/2023" setCustomValidityRangeOverflow="Selected date is later than maximum date.">
|
|
575
|
+
<span slot="bib.fullscreen.headline">maxDate Example</span>
|
|
576
|
+
<span slot="fromLabel">Choose a date</span>
|
|
577
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
578
|
+
</auro-datepicker>
|
|
579
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
608
580
|
</div>
|
|
609
581
|
<auro-accordion alignRight>
|
|
610
|
-
|
|
582
|
+
<span slot="trigger">See code</span>
|
|
611
583
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/max-date.html) -->
|
|
612
584
|
<!-- The below code snippet is automatically added from ./../apiExamples/max-date.html -->
|
|
613
585
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
</auro-datepicker>
|
|
620
|
-
```
|
|
586
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker maxDate="03/25/2023" setCustomValidityRangeOverflow="Selected date is later than maximum date.">
|
|
587
|
+
<span slot="bib.fullscreen.headline">maxDate Example</span>
|
|
588
|
+
<span slot="fromLabel">Choose a date</span>
|
|
589
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
590
|
+
</auro-datepicker></code></pre>
|
|
621
591
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
622
592
|
</auro-accordion>
|
|
623
593
|
|
|
@@ -631,74 +601,70 @@ Setting the `maxDate` attribute to a date earlier than the auro-datepicker `valu
|
|
|
631
601
|
This example demonstrates that behavior.
|
|
632
602
|
|
|
633
603
|
<div class="exampleWrapper">
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
604
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/update-max-date.html) -->
|
|
605
|
+
<!-- The below content is automatically added from ./../apiExamples/update-max-date.html -->
|
|
606
|
+
<auro-button id="maxDateChange">Change maxDate to Today's Date</auro-button>
|
|
607
|
+
<auro-button id="resetMaxDate">Reset Datepicker to Initial Example</auro-button>
|
|
608
|
+
<br />
|
|
609
|
+
<auro-datepicker id="maxDateExample" setCustomValidityRangeOverflow="Selected date is later than maximum date.">
|
|
610
|
+
<span slot="bib.fullscreen.headline">maxDate Example</span>
|
|
611
|
+
<span slot="fromLabel">Choose a date</span>
|
|
612
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
613
|
+
</auro-datepicker>
|
|
614
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
645
615
|
</div>
|
|
646
616
|
<auro-accordion alignRight>
|
|
647
|
-
|
|
617
|
+
<span slot="trigger">See code</span>
|
|
648
618
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/update-max-date.html) -->
|
|
649
619
|
<!-- The below code snippet is automatically added from ./../apiExamples/update-max-date.html -->
|
|
650
620
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
</auro-datepicker>
|
|
660
|
-
```
|
|
621
|
+
<pre class="language-html"><code class="language-html"><auro-button id="maxDateChange">Change maxDate to Today's Date</auro-button>
|
|
622
|
+
<auro-button id="resetMaxDate">Reset Datepicker to Initial Example</auro-button>
|
|
623
|
+
<br />
|
|
624
|
+
<auro-datepicker id="maxDateExample" setCustomValidityRangeOverflow="Selected date is later than maximum date.">
|
|
625
|
+
<span slot="bib.fullscreen.headline">maxDate Example</span>
|
|
626
|
+
<span slot="fromLabel">Choose a date</span>
|
|
627
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
628
|
+
</auro-datepicker></code></pre>
|
|
661
629
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
662
630
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/update-max-date.js) -->
|
|
663
631
|
<!-- The below code snippet is automatically added from ./../apiExamples/update-max-date.js -->
|
|
664
632
|
|
|
665
|
-
|
|
666
|
-
function formatDateString(date) {
|
|
633
|
+
<pre class="language-js"><code class="language-js">function formatDateString(date) {
|
|
667
634
|
/* eslint-disable prefer-template, no-magic-numbers */
|
|
668
635
|
const dd = String("0" + date.getDate()).slice(-2);
|
|
669
636
|
const mm = String("0" + (date.getMonth() + 1)).slice(-2);
|
|
670
637
|
/* eslint-enable prefer-template, no-magic-numbers */
|
|
671
638
|
const yyyy = date.getFullYear();
|
|
672
|
-
|
|
639
|
+
|
|
673
640
|
return `${mm}/${dd}/${yyyy}`;
|
|
674
641
|
}
|
|
675
|
-
|
|
642
|
+
|
|
676
643
|
export function updateMaxDateExample() {
|
|
677
644
|
const maxDateExample = document.getElementById('maxDateExample');
|
|
678
645
|
const changeMaxDateButton = document.getElementById('maxDateChange');
|
|
679
646
|
const resetButton = document.getElementById('resetMaxDate');
|
|
680
|
-
|
|
647
|
+
|
|
681
648
|
const today = formatDateString(new Date());
|
|
682
|
-
|
|
649
|
+
|
|
683
650
|
let nextWeek = new Date();
|
|
684
651
|
let addOneWeek = nextWeek.getDate() + 7;
|
|
685
|
-
|
|
652
|
+
|
|
686
653
|
nextWeek.setDate(addOneWeek);
|
|
687
654
|
nextWeek = formatDateString(nextWeek);
|
|
688
|
-
|
|
655
|
+
|
|
689
656
|
maxDateExample.setAttribute('value', nextWeek);
|
|
690
657
|
maxDateExample.setAttribute('maxDate', nextWeek);
|
|
691
|
-
|
|
692
|
-
changeMaxDateButton.addEventListener('click', ()
|
|
658
|
+
|
|
659
|
+
changeMaxDateButton.addEventListener('click', () => {
|
|
693
660
|
maxDateExample.setAttribute('maxDate', today);
|
|
694
661
|
});
|
|
695
|
-
|
|
696
|
-
resetButton.addEventListener('click', ()
|
|
662
|
+
|
|
663
|
+
resetButton.addEventListener('click', () => {
|
|
697
664
|
maxDateExample.setAttribute('value', nextWeek);
|
|
698
665
|
maxDateExample.setAttribute('maxDate', nextWeek);
|
|
699
666
|
});
|
|
700
|
-
}
|
|
701
|
-
```
|
|
667
|
+
}</code></pre>
|
|
702
668
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
703
669
|
</auro-accordion>
|
|
704
670
|
|
|
@@ -707,27 +673,25 @@ export function updateMaxDateExample() {
|
|
|
707
673
|
To give a lower limit you can bind a date to the `minDate` attribute. It is recommended to use the `setCustomValidityRangeUnderflow` attribute to define an error message to display when validation fails the minimum date restriction.
|
|
708
674
|
|
|
709
675
|
<div class="exampleWrapper">
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
676
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/min-date.html) -->
|
|
677
|
+
<!-- The below content is automatically added from ./../apiExamples/min-date.html -->
|
|
678
|
+
<auro-datepicker minDate="03/25/2028" setCustomValidityRangeUnderflow="Selected date is earlier than the minimum date.">
|
|
679
|
+
<span slot="bib.fullscreen.headline">minDate Example</span>
|
|
680
|
+
<span slot="fromLabel">Choose a date</span>
|
|
681
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
682
|
+
</auro-datepicker>
|
|
683
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
718
684
|
</div>
|
|
719
685
|
<auro-accordion alignRight>
|
|
720
|
-
|
|
686
|
+
<span slot="trigger">See code</span>
|
|
721
687
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/min-date.html) -->
|
|
722
688
|
<!-- The below code snippet is automatically added from ./../apiExamples/min-date.html -->
|
|
723
689
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
</auro-datepicker>
|
|
730
|
-
```
|
|
690
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker minDate="03/25/2028" setCustomValidityRangeUnderflow="Selected date is earlier than the minimum date.">
|
|
691
|
+
<span slot="bib.fullscreen.headline">minDate Example</span>
|
|
692
|
+
<span slot="fromLabel">Choose a date</span>
|
|
693
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
694
|
+
</auro-datepicker></code></pre>
|
|
731
695
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
732
696
|
</auro-accordion>
|
|
733
697
|
|
|
@@ -741,75 +705,71 @@ Setting the `minDate` attribute to a date later than the auro-datepicker `value`
|
|
|
741
705
|
This example demonstrates that behavior.
|
|
742
706
|
|
|
743
707
|
<div class="exampleWrapper">
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
708
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/update-min-date.html) -->
|
|
709
|
+
<!-- The below content is automatically added from ./../apiExamples/update-min-date.html -->
|
|
710
|
+
<auro-button id="minDateChange">Change minDate to a week from Today</auro-button>
|
|
711
|
+
<auro-button id="resetMinDate">Reset Datepicker to Initial Example</auro-button>
|
|
712
|
+
<br />
|
|
713
|
+
<auro-datepicker id="minDateExample" setCustomValidityRangeUnderflow="Selected date is earlier than the minimum date.">
|
|
714
|
+
<span slot="bib.fullscreen.headline">minDate Example</span>
|
|
715
|
+
<span slot="fromLabel">Choose a date</span>
|
|
716
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
717
|
+
</auro-datepicker>
|
|
718
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
755
719
|
</div>
|
|
756
720
|
<auro-accordion alignRight>
|
|
757
|
-
|
|
721
|
+
<span slot="trigger">See code</span>
|
|
758
722
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/update-min-date.html) -->
|
|
759
723
|
<!-- The below code snippet is automatically added from ./../apiExamples/update-min-date.html -->
|
|
760
724
|
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
</auro-datepicker>
|
|
770
|
-
```
|
|
725
|
+
<pre class="language-html"><code class="language-html"><auro-button id="minDateChange">Change minDate to a week from Today</auro-button>
|
|
726
|
+
<auro-button id="resetMinDate">Reset Datepicker to Initial Example</auro-button>
|
|
727
|
+
<br />
|
|
728
|
+
<auro-datepicker id="minDateExample" setCustomValidityRangeUnderflow="Selected date is earlier than the minimum date.">
|
|
729
|
+
<span slot="bib.fullscreen.headline">minDate Example</span>
|
|
730
|
+
<span slot="fromLabel">Choose a date</span>
|
|
731
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
732
|
+
</auro-datepicker></code></pre>
|
|
771
733
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
772
734
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/update-min-date.js) -->
|
|
773
735
|
<!-- The below code snippet is automatically added from ./../apiExamples/update-min-date.js -->
|
|
774
736
|
|
|
775
|
-
|
|
776
|
-
function formatDateString(date) {
|
|
737
|
+
<pre class="language-js"><code class="language-js">function formatDateString(date) {
|
|
777
738
|
/* eslint-disable prefer-template, no-magic-numbers */
|
|
778
739
|
const dd = String("0" + date.getDate()).slice(-2);
|
|
779
740
|
const mm = String("0" + (date.getMonth() + 1)).slice(-2);
|
|
780
741
|
/* eslint-enable prefer-template, no-magic-numbers */
|
|
781
742
|
const yyyy = date.getFullYear();
|
|
782
|
-
|
|
743
|
+
|
|
783
744
|
return `${mm}/${dd}/${yyyy}`;
|
|
784
745
|
}
|
|
785
|
-
|
|
746
|
+
|
|
786
747
|
export function updateMinDateExample() {
|
|
787
748
|
const minDateExample = document.getElementById('minDateExample');
|
|
788
749
|
const changeMinDateButton = document.getElementById('minDateChange');
|
|
789
750
|
const resetButton = document.getElementById('resetMinDate');
|
|
790
|
-
|
|
751
|
+
|
|
791
752
|
const today = formatDateString(new Date());
|
|
792
|
-
|
|
753
|
+
|
|
793
754
|
let nextWeek = new Date();
|
|
794
755
|
let addOneWeek = nextWeek.getDate() + 7;
|
|
795
|
-
|
|
756
|
+
|
|
796
757
|
nextWeek.setDate(addOneWeek);
|
|
797
758
|
nextWeek = formatDateString(nextWeek);
|
|
798
|
-
|
|
759
|
+
|
|
799
760
|
minDateExample.setAttribute('value', today);
|
|
800
761
|
minDateExample.setAttribute('minDate', today);
|
|
801
|
-
|
|
802
|
-
changeMinDateButton.addEventListener('click', ()
|
|
762
|
+
|
|
763
|
+
changeMinDateButton.addEventListener('click', () => {
|
|
803
764
|
minDateExample.setAttribute('minDate', nextWeek);
|
|
804
765
|
});
|
|
805
|
-
|
|
806
|
-
resetButton.addEventListener('click', ()
|
|
766
|
+
|
|
767
|
+
resetButton.addEventListener('click', () => {
|
|
807
768
|
minDateExample.setAttribute('value', today);
|
|
808
769
|
minDateExample.setAttribute('minDate', today);
|
|
809
770
|
});
|
|
810
|
-
|
|
811
|
-
}
|
|
812
|
-
```
|
|
771
|
+
|
|
772
|
+
}</code></pre>
|
|
813
773
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
814
774
|
</auro-accordion>
|
|
815
775
|
|
|
@@ -820,38 +780,34 @@ The datepicker supports localized month names through the `monthNames` property.
|
|
|
820
780
|
This example demonstrates how to set the `monthNames` property to Korean month names, with a Korean date format.
|
|
821
781
|
|
|
822
782
|
<div class="exampleWrapper">
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
783
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization.html) -->
|
|
784
|
+
<!-- The below content is automatically added from ./../apiExamples/localization.html -->
|
|
785
|
+
<auro-datepicker format="yyyy/mm/dd" id="localizationExample">
|
|
786
|
+
<span slot="bib.fullscreen.headline">Localization Headline</span>
|
|
787
|
+
<span slot="fromLabel">Choose a date</span>
|
|
788
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
789
|
+
</auro-datepicker>
|
|
790
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
831
791
|
</div>
|
|
832
792
|
<auro-accordion alignRight>
|
|
833
|
-
|
|
793
|
+
<span slot="trigger">See code</span>
|
|
834
794
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/localization.html) -->
|
|
835
795
|
<!-- The below code snippet is automatically added from ./../apiExamples/localization.html -->
|
|
836
796
|
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
</auro-datepicker>
|
|
843
|
-
```
|
|
797
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker format="yyyy/mm/dd" id="localizationExample">
|
|
798
|
+
<span slot="bib.fullscreen.headline">Localization Headline</span>
|
|
799
|
+
<span slot="fromLabel">Choose a date</span>
|
|
800
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
801
|
+
</auro-datepicker></code></pre>
|
|
844
802
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
845
803
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/localization.js) -->
|
|
846
804
|
<!-- The below code snippet is automatically added from ./../apiExamples/localization.js -->
|
|
847
805
|
|
|
848
|
-
|
|
849
|
-
export function localizationExample() {
|
|
806
|
+
<pre class="language-js"><code class="language-js">export function localizationExample() {
|
|
850
807
|
const localizedDatepicker = document.querySelector("#localizationExample");
|
|
851
|
-
|
|
808
|
+
|
|
852
809
|
localizedDatepicker.monthNames = ['일월', '이월', '삼월', '사월', '오월', '유월', '칠월', '팔월', '구월', '시월', '십일월', '십이월'];
|
|
853
|
-
}
|
|
854
|
-
```
|
|
810
|
+
}</code></pre>
|
|
855
811
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
856
812
|
</auro-accordion>
|
|
857
813
|
|
|
@@ -860,27 +816,25 @@ export function localizationExample() {
|
|
|
860
816
|
Set `noValidate` to force the datepicker not to validate when navigating away from the component.
|
|
861
817
|
|
|
862
818
|
<div class="exampleWrapper">
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
819
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/no-validate.html) -->
|
|
820
|
+
<!-- The below content is automatically added from ./../apiExamples/no-validate.html -->
|
|
821
|
+
<auro-datepicker required noValidate>
|
|
822
|
+
<span slot="bib.fullscreen.headline">noValidate Example</span>
|
|
823
|
+
<span slot="fromLabel">Choose a date</span>
|
|
824
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
825
|
+
</auro-datepicker>
|
|
826
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
871
827
|
</div>
|
|
872
828
|
<auro-accordion alignRight>
|
|
873
|
-
|
|
829
|
+
<span slot="trigger">See code</span>
|
|
874
830
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/no-validate.html) -->
|
|
875
831
|
<!-- The below code snippet is automatically added from ./../apiExamples/no-validate.html -->
|
|
876
832
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
</auro-datepicker>
|
|
883
|
-
```
|
|
833
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker required noValidate>
|
|
834
|
+
<span slot="bib.fullscreen.headline">noValidate Example</span>
|
|
835
|
+
<span slot="fromLabel">Choose a date</span>
|
|
836
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
837
|
+
</auro-datepicker></code></pre>
|
|
884
838
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
885
839
|
</auro-accordion>
|
|
886
840
|
|
|
@@ -889,34 +843,30 @@ Set `noValidate` to force the datepicker not to validate when navigating away fr
|
|
|
889
843
|
You can choose to outline dates for the user to reference by passing a string containing an array of values to the component to tell it which dates are your reference dates.
|
|
890
844
|
|
|
891
845
|
Example:
|
|
892
|
-
|
|
893
|
-
<auro-datepicker referenceDates='["10/05/2025", "10/15/2025", "10/20/2025", "10/22/2025"]'></auro-datepicker>
|
|
894
|
-
```
|
|
846
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker referenceDates='["10/05/2025", "10/15/2025", "10/20/2025", "10/22/2025"]'></auro-datepicker></code></pre>
|
|
895
847
|
|
|
896
848
|
<div class="exampleWrapper">
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
849
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/reference-dates.html) -->
|
|
850
|
+
<!-- The below content is automatically added from ./../apiExamples/reference-dates.html -->
|
|
851
|
+
<auro-datepicker referenceDates='["10/05/2025", "10/15/2025", "10/20/2025", "10/22/2025"]' minDate="10/12/2025">
|
|
852
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
853
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
854
|
+
<span slot="fromLabel">Choose a date</span>
|
|
855
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
856
|
+
</auro-datepicker>
|
|
857
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
906
858
|
</div>
|
|
907
859
|
<auro-accordion alignRight>
|
|
908
|
-
|
|
860
|
+
<span slot="trigger">See code</span>
|
|
909
861
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reference-dates.html) -->
|
|
910
862
|
<!-- The below code snippet is automatically added from ./../apiExamples/reference-dates.html -->
|
|
911
863
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
</auro-datepicker>
|
|
919
|
-
```
|
|
864
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker referenceDates='["10/05/2025", "10/15/2025", "10/20/2025", "10/22/2025"]' minDate="10/12/2025">
|
|
865
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
866
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
867
|
+
<span slot="fromLabel">Choose a date</span>
|
|
868
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
869
|
+
</auro-datepicker></code></pre>
|
|
920
870
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
921
871
|
</auro-accordion>
|
|
922
872
|
|
|
@@ -927,43 +877,41 @@ Populates the `required` attribute on the input. Used for client-side validation
|
|
|
927
877
|
When the validity check fails the validityState, equals `valueMissing`. The error message for the `valueMissing` validityState can be set to a custom string using the `setCustomValidityValueMissing`. There is no default error message defined.
|
|
928
878
|
|
|
929
879
|
<div class="exampleWrapper">
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
880
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/required.html) -->
|
|
881
|
+
<!-- The below content is automatically added from ./../apiExamples/required.html -->
|
|
882
|
+
<auro-datepicker required setCustomValidityValueMissing="Custom value missing message.">
|
|
883
|
+
<span slot="bib.fullscreen.headline">Required Example</span>
|
|
884
|
+
<span slot="fromLabel">Choose a date</span>
|
|
885
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
886
|
+
</auro-datepicker>
|
|
887
|
+
<br />
|
|
888
|
+
<auro-datepicker required range setCustomValidityValueMissing="Custom value missing message.">
|
|
889
|
+
<span slot="bib.fullscreen.headline">Required Example</span>
|
|
890
|
+
<span slot="fromLabel">Departure</span>
|
|
891
|
+
<span slot="toLabel">Return</span>
|
|
892
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
893
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
894
|
+
</auro-datepicker>
|
|
895
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
946
896
|
</div>
|
|
947
897
|
<auro-accordion alignRight>
|
|
948
|
-
|
|
898
|
+
<span slot="trigger">See code</span>
|
|
949
899
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/required.html) -->
|
|
950
900
|
<!-- The below code snippet is automatically added from ./../apiExamples/required.html -->
|
|
951
901
|
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
</auro-datepicker>
|
|
966
|
-
```
|
|
902
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker required setCustomValidityValueMissing="Custom value missing message.">
|
|
903
|
+
<span slot="bib.fullscreen.headline">Required Example</span>
|
|
904
|
+
<span slot="fromLabel">Choose a date</span>
|
|
905
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
906
|
+
</auro-datepicker>
|
|
907
|
+
<br />
|
|
908
|
+
<auro-datepicker required range setCustomValidityValueMissing="Custom value missing message.">
|
|
909
|
+
<span slot="bib.fullscreen.headline">Required Example</span>
|
|
910
|
+
<span slot="fromLabel">Departure</span>
|
|
911
|
+
<span slot="toLabel">Return</span>
|
|
912
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
913
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
914
|
+
</auro-datepicker></code></pre>
|
|
967
915
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
968
916
|
</auro-accordion>
|
|
969
917
|
|
|
@@ -972,29 +920,27 @@ When the validity check fails the validityState, equals `valueMissing`. The erro
|
|
|
972
920
|
Set the `stacked` attribute to make range datepicker stacked style.
|
|
973
921
|
|
|
974
922
|
<div class="exampleWrapper">
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
923
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/stacked.html) -->
|
|
924
|
+
<!-- The below content is automatically added from ./../apiExamples/stacked.html -->
|
|
925
|
+
<auro-datepicker range stacked>
|
|
926
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
927
|
+
<span slot="fromLabel">Choose a date</span>
|
|
928
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
929
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
930
|
+
</auro-datepicker>
|
|
931
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
984
932
|
</div>
|
|
985
933
|
<auro-accordion alignRight>
|
|
986
|
-
|
|
934
|
+
<span slot="trigger">See code</span>
|
|
987
935
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/stacked.html) -->
|
|
988
936
|
<!-- The below code snippet is automatically added from ./../apiExamples/stacked.html -->
|
|
989
937
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
</auro-datepicker>
|
|
997
|
-
```
|
|
938
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker range stacked>
|
|
939
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
940
|
+
<span slot="fromLabel">Choose a date</span>
|
|
941
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
942
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
943
|
+
</auro-datepicker></code></pre>
|
|
998
944
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
999
945
|
</auro-accordion>
|
|
1000
946
|
|
|
@@ -1003,46 +949,42 @@ Set the `stacked` attribute to make range datepicker stacked style.
|
|
|
1003
949
|
Specifies the `validityState` the element is in. Upon first interaction, or presetting the `error` attribute, the component will validate on `focusout`. After validation, `validityState` can be queried from the component by using the following JavaScript.
|
|
1004
950
|
|
|
1005
951
|
<div class="exampleWrapper">
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
952
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/validity.html) -->
|
|
953
|
+
<!-- The below content is automatically added from ./../apiExamples/validity.html -->
|
|
954
|
+
<auro-button id="validityExampleBtn">Get validity</auro-button>
|
|
955
|
+
<br />
|
|
956
|
+
<auro-datepicker required id="validityExample">
|
|
957
|
+
<span slot="bib.fullscreen.headline">validity Example</span>
|
|
958
|
+
<span slot="fromLabel">Choose a date</span>
|
|
959
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
960
|
+
</auro-datepicker>
|
|
961
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1016
962
|
</div>
|
|
1017
963
|
<auro-accordion alignRight>
|
|
1018
|
-
|
|
964
|
+
<span slot="trigger">See code</span>
|
|
1019
965
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/validity.html) -->
|
|
1020
966
|
<!-- The below code snippet is automatically added from ./../apiExamples/validity.html -->
|
|
1021
967
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
</auro-datepicker>
|
|
1030
|
-
```
|
|
968
|
+
<pre class="language-html"><code class="language-html"><auro-button id="validityExampleBtn">Get validity</auro-button>
|
|
969
|
+
<br />
|
|
970
|
+
<auro-datepicker required id="validityExample">
|
|
971
|
+
<span slot="bib.fullscreen.headline">validity Example</span>
|
|
972
|
+
<span slot="fromLabel">Choose a date</span>
|
|
973
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
974
|
+
</auro-datepicker></code></pre>
|
|
1031
975
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1032
976
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/validity.js) -->
|
|
1033
977
|
<!-- The below code snippet is automatically added from ./../apiExamples/validity.js -->
|
|
1034
978
|
|
|
1035
|
-
|
|
1036
|
-
export function validityExample() {
|
|
979
|
+
<pre class="language-js"><code class="language-js">export function validityExample() {
|
|
1037
980
|
const validityExampleExample = document.querySelector('#validityExample');
|
|
1038
981
|
const validityExampleExampleBtn = document.querySelector('#validityExampleBtn');
|
|
1039
|
-
|
|
1040
|
-
validityExampleExampleBtn.addEventListener('click', ()
|
|
982
|
+
|
|
983
|
+
validityExampleExampleBtn.addEventListener('click', () => {
|
|
1041
984
|
console.warn('Validity set to:', validityExampleExample.validity);
|
|
1042
985
|
alert(`Validity set to: ${validityExampleExample.validity}`);
|
|
1043
986
|
})
|
|
1044
|
-
}
|
|
1045
|
-
```
|
|
987
|
+
}</code></pre>
|
|
1046
988
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1047
989
|
</auro-accordion>
|
|
1048
990
|
|
|
@@ -1051,27 +993,25 @@ export function validityExample() {
|
|
|
1051
993
|
The `value` attribute represents the value selected for the datepicker. Can be used to pre-set the value of the datepicker. When the `range` attribute is used, `value` is for the first input.
|
|
1052
994
|
|
|
1053
995
|
<div class="exampleWrapper">
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
996
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/value.html) -->
|
|
997
|
+
<!-- The below content is automatically added from ./../apiExamples/value.html -->
|
|
998
|
+
<auro-datepicker id="valueExample" value="02/02/2022">
|
|
999
|
+
<span slot="bib.fullscreen.headline">value Example</span>
|
|
1000
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1001
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1002
|
+
</auro-datepicker>
|
|
1003
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1062
1004
|
</div>
|
|
1063
1005
|
<auro-accordion alignRight>
|
|
1064
|
-
|
|
1006
|
+
<span slot="trigger">See code</span>
|
|
1065
1007
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/value.html) -->
|
|
1066
1008
|
<!-- The below code snippet is automatically added from ./../apiExamples/value.html -->
|
|
1067
1009
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
</auro-datepicker>
|
|
1074
|
-
```
|
|
1010
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker id="valueExample" value="02/02/2022">
|
|
1011
|
+
<span slot="bib.fullscreen.headline">value Example</span>
|
|
1012
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1013
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1014
|
+
</auro-datepicker></code></pre>
|
|
1075
1015
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1076
1016
|
</auro-accordion>
|
|
1077
1017
|
|
|
@@ -1080,31 +1020,29 @@ The `value` attribute represents the value selected for the datepicker. Can be u
|
|
|
1080
1020
|
The `valueEnd` attribute represents the value of the second input (end date), selected for the datepicker. Can be used to pre-set the value of the datepicker. Only applicable for a datepicker with the `range` attribute.
|
|
1081
1021
|
|
|
1082
1022
|
<div class="exampleWrapper">
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1023
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/value-end.html) -->
|
|
1024
|
+
<!-- The below content is automatically added from ./../apiExamples/value-end.html -->
|
|
1025
|
+
<auro-datepicker id="valueEndExample" range valueEnd="03/03/2023">
|
|
1026
|
+
<span slot="bib.fullscreen.headline">valueEnd Example</span>
|
|
1027
|
+
<span slot="fromLabel">Departure</span>
|
|
1028
|
+
<span slot="toLabel">Return</span>
|
|
1029
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
1030
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
1031
|
+
</auro-datepicker>
|
|
1032
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1093
1033
|
</div>
|
|
1094
1034
|
<auro-accordion alignRight>
|
|
1095
|
-
|
|
1035
|
+
<span slot="trigger">See code</span>
|
|
1096
1036
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/value-end.html) -->
|
|
1097
1037
|
<!-- The below code snippet is automatically added from ./../apiExamples/value-end.html -->
|
|
1098
1038
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
</auro-datepicker>
|
|
1107
|
-
```
|
|
1039
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker id="valueEndExample" range valueEnd="03/03/2023">
|
|
1040
|
+
<span slot="bib.fullscreen.headline">valueEnd Example</span>
|
|
1041
|
+
<span slot="fromLabel">Departure</span>
|
|
1042
|
+
<span slot="toLabel">Return</span>
|
|
1043
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
1044
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
1045
|
+
</auro-datepicker></code></pre>
|
|
1108
1046
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1109
1047
|
</auro-accordion>
|
|
1110
1048
|
|
|
@@ -1115,56 +1053,52 @@ The `valueEnd` attribute represents the value of the second input (end date), se
|
|
|
1115
1053
|
The `focus()` method will apply focus state to the datepicker's input field.
|
|
1116
1054
|
|
|
1117
1055
|
<div class="exampleWrapper">
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1056
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/focus.html) -->
|
|
1057
|
+
<!-- The below content is automatically added from ./../apiExamples/focus.html -->
|
|
1058
|
+
<auro-button id="focusExampleBtn">Apply focus to datepicker</auro-button>
|
|
1059
|
+
<auro-button id="focusExampleBtnTwo">Apply focus to the second input in datepicker</auro-button>
|
|
1060
|
+
<br />
|
|
1061
|
+
<auro-datepicker id="focusExampleElem" range>
|
|
1062
|
+
<span slot="bib.fullscreen.headline">Focus Example</span>
|
|
1063
|
+
<span slot="fromLabel">Departure</span>
|
|
1064
|
+
<span slot="toLabel">Return</span>
|
|
1065
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1066
|
+
<span slot="bib.fullscreen.toLabel">Choose a date</span>
|
|
1067
|
+
</auro-datepicker>
|
|
1068
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1131
1069
|
</div>
|
|
1132
1070
|
<auro-accordion alignRight>
|
|
1133
|
-
|
|
1071
|
+
<span slot="trigger">See code</span>
|
|
1134
1072
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/focus.html) -->
|
|
1135
1073
|
<!-- The below code snippet is automatically added from ./../apiExamples/focus.html -->
|
|
1136
1074
|
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
</auro-datepicker>
|
|
1148
|
-
```
|
|
1075
|
+
<pre class="language-html"><code class="language-html"><auro-button id="focusExampleBtn">Apply focus to datepicker</auro-button>
|
|
1076
|
+
<auro-button id="focusExampleBtnTwo">Apply focus to the second input in datepicker</auro-button>
|
|
1077
|
+
<br />
|
|
1078
|
+
<auro-datepicker id="focusExampleElem" range>
|
|
1079
|
+
<span slot="bib.fullscreen.headline">Focus Example</span>
|
|
1080
|
+
<span slot="fromLabel">Departure</span>
|
|
1081
|
+
<span slot="toLabel">Return</span>
|
|
1082
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1083
|
+
<span slot="bib.fullscreen.toLabel">Choose a date</span>
|
|
1084
|
+
</auro-datepicker></code></pre>
|
|
1149
1085
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1150
1086
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/focus.js) -->
|
|
1151
1087
|
<!-- The below code snippet is automatically added from ./../apiExamples/focus.js -->
|
|
1152
1088
|
|
|
1153
|
-
|
|
1154
|
-
export function focusExample() {
|
|
1089
|
+
<pre class="language-js"><code class="language-js">export function focusExample() {
|
|
1155
1090
|
const focusExampleElem = document.querySelector('#focusExampleElem');
|
|
1156
1091
|
const focusExampleBtn = document.querySelector('#focusExampleBtn');
|
|
1157
1092
|
const focusExampleBtnTwo = document.querySelector('#focusExampleBtnTwo');
|
|
1158
|
-
|
|
1159
|
-
focusExampleBtn.addEventListener('click', ()
|
|
1093
|
+
|
|
1094
|
+
focusExampleBtn.addEventListener('click', () => {
|
|
1160
1095
|
focusExampleElem.focus();
|
|
1161
1096
|
});
|
|
1162
|
-
|
|
1163
|
-
focusExampleBtnTwo.addEventListener('click', ()
|
|
1097
|
+
|
|
1098
|
+
focusExampleBtnTwo.addEventListener('click', () => {
|
|
1164
1099
|
focusExampleElem.focus('endDate');
|
|
1165
1100
|
});
|
|
1166
|
-
}
|
|
1167
|
-
```
|
|
1101
|
+
}</code></pre>
|
|
1168
1102
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1169
1103
|
</auro-accordion>
|
|
1170
1104
|
|
|
@@ -1173,48 +1107,44 @@ export function focusExample() {
|
|
|
1173
1107
|
Use the `reset()` method to reset the `<auro-datepicker>`'s `value`, `valueEnd` and `validity` state. Doing so will preserve all other attributes and properties.
|
|
1174
1108
|
|
|
1175
1109
|
<div class="exampleWrapper">
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1110
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/reset-state.html) -->
|
|
1111
|
+
<!-- The below content is automatically added from ./../apiExamples/reset-state.html -->
|
|
1112
|
+
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
1113
|
+
<br />
|
|
1114
|
+
<auro-datepicker id="resetStateExample" range minDate="06/30/2025" calendarStartDate="06/30/2025" calendarFocusDate="06/30/2025" value="02/14/2025" valueEnd="04/05/2025" setCustomValidityRangeUnderflow="The date you entered is too early.">
|
|
1115
|
+
<span slot="bib.fullscreen.headline">Reset Example</span>
|
|
1116
|
+
<span slot="fromLabel">Departure</span>
|
|
1117
|
+
<span slot="toLabel">Return</span>
|
|
1118
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
1119
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
1120
|
+
</auro-datepicker>
|
|
1121
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1188
1122
|
</div>
|
|
1189
1123
|
<auro-accordion alignRight>
|
|
1190
|
-
|
|
1124
|
+
<span slot="trigger">See code</span>
|
|
1191
1125
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.html) -->
|
|
1192
1126
|
<!-- The below code snippet is automatically added from ./../apiExamples/reset-state.html -->
|
|
1193
1127
|
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
</auro-datepicker>
|
|
1204
|
-
```
|
|
1128
|
+
<pre class="language-html"><code class="language-html"><auro-button id="resetStateBtn">Reset</auro-button>
|
|
1129
|
+
<br />
|
|
1130
|
+
<auro-datepicker id="resetStateExample" range minDate="06/30/2025" calendarStartDate="06/30/2025" calendarFocusDate="06/30/2025" value="02/14/2025" valueEnd="04/05/2025" setCustomValidityRangeUnderflow="The date you entered is too early.">
|
|
1131
|
+
<span slot="bib.fullscreen.headline">Reset Example</span>
|
|
1132
|
+
<span slot="fromLabel">Departure</span>
|
|
1133
|
+
<span slot="toLabel">Return</span>
|
|
1134
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
1135
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
1136
|
+
</auro-datepicker></code></pre>
|
|
1205
1137
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1206
1138
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.js) -->
|
|
1207
1139
|
<!-- The below code snippet is automatically added from ./../apiExamples/reset-state.js -->
|
|
1208
1140
|
|
|
1209
|
-
|
|
1210
|
-
export function resetStateExample() {
|
|
1141
|
+
<pre class="language-js"><code class="language-js">export function resetStateExample() {
|
|
1211
1142
|
const elem = document.querySelector('#resetStateExample');
|
|
1212
|
-
|
|
1213
|
-
document.querySelector('#resetStateBtn').addEventListener('click', ()
|
|
1143
|
+
|
|
1144
|
+
document.querySelector('#resetStateBtn').addEventListener('click', () => {
|
|
1214
1145
|
elem.reset();
|
|
1215
1146
|
});
|
|
1216
|
-
}
|
|
1217
|
-
```
|
|
1147
|
+
}</code></pre>
|
|
1218
1148
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1219
1149
|
</auro-accordion>
|
|
1220
1150
|
|
|
@@ -1225,41 +1155,37 @@ export function resetStateExample() {
|
|
|
1225
1155
|
The following example listens for the `auroDatePicker-valueSet` event. Once triggered, `element.value` may be queried for the new value **and** in successful scenarios, an alert will appear. Open the JavaScript console in the browser's developer tools to see the `console.warn` message that appears after the `auroDatePicker-valueSet` event has been triggered.
|
|
1226
1156
|
|
|
1227
1157
|
<div class="exampleWrapper">
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1158
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/alert-value.html) -->
|
|
1159
|
+
<!-- The below content is automatically added from ./../apiExamples/alert-value.html -->
|
|
1160
|
+
<auro-datepicker id="datePickerValueAlert">
|
|
1161
|
+
<span slot="bib.fullscreen.headline">Alert Value Example</span>
|
|
1162
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1163
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1164
|
+
</auro-datepicker>
|
|
1165
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1236
1166
|
</div>
|
|
1237
1167
|
<auro-accordion alignRight>
|
|
1238
|
-
|
|
1168
|
+
<span slot="trigger">See code</span>
|
|
1239
1169
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/alert-value.html) -->
|
|
1240
1170
|
<!-- The below code snippet is automatically added from ./../apiExamples/alert-value.html -->
|
|
1241
1171
|
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
</auro-datepicker>
|
|
1248
|
-
```
|
|
1172
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker id="datePickerValueAlert">
|
|
1173
|
+
<span slot="bib.fullscreen.headline">Alert Value Example</span>
|
|
1174
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1175
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1176
|
+
</auro-datepicker></code></pre>
|
|
1249
1177
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1250
1178
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/alert-value.js) -->
|
|
1251
1179
|
<!-- The below code snippet is automatically added from ./../apiExamples/alert-value.js -->
|
|
1252
1180
|
|
|
1253
|
-
|
|
1254
|
-
export function alertValueExample() {
|
|
1181
|
+
<pre class="language-js"><code class="language-js">export function alertValueExample() {
|
|
1255
1182
|
const valueAlertExample = document.querySelector('#datePickerValueAlert');
|
|
1256
|
-
|
|
1257
|
-
valueAlertExample.addEventListener('auroDatePicker-valueSet', ()
|
|
1183
|
+
|
|
1184
|
+
valueAlertExample.addEventListener('auroDatePicker-valueSet', () => {
|
|
1258
1185
|
console.warn('Select value changed to:', valueAlertExample.value);
|
|
1259
1186
|
alert(`Select value changed to: ${valueAlertExample.value}`);
|
|
1260
1187
|
})
|
|
1261
|
-
}
|
|
1262
|
-
```
|
|
1188
|
+
}</code></pre>
|
|
1263
1189
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1264
1190
|
</auro-accordion>
|
|
1265
1191
|
|
|
@@ -1270,58 +1196,54 @@ export function alertValueExample() {
|
|
|
1270
1196
|
Use the `ariaLabel.input.clear` slot to set the `aria-label` for the clear button in the trigger input.
|
|
1271
1197
|
|
|
1272
1198
|
<div class="exampleWrapper">
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1199
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/aria-label-input-clear.html) -->
|
|
1200
|
+
<!-- The below content is automatically added from ./../apiExamples/aria-label-input-clear.html -->
|
|
1201
|
+
<auro-datepicker>
|
|
1202
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1203
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
1204
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1205
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1206
|
+
<span slot="ariaLabel.input.clear">Custom Clear Input Button</span>
|
|
1207
|
+
</auro-datepicker>
|
|
1208
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1283
1209
|
</div>
|
|
1284
1210
|
<div class="exampleWrapper--ondark">
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1211
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/snowflake/aria-label-input-clear.html) -->
|
|
1212
|
+
<!-- The below content is automatically added from ./../apiExamples/snowflake/aria-label-input-clear.html -->
|
|
1213
|
+
<auro-datepicker layout="snowflake" shape="snowflake" ondark placeholder="MM/DD/YYYY">
|
|
1214
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1215
|
+
<span slot="label">Date</span>
|
|
1216
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
1217
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1218
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1219
|
+
<span slot="ariaLabel.input.clear">Snowflake Clear Input Button</span>
|
|
1220
|
+
</auro-datepicker>
|
|
1221
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1296
1222
|
</div>
|
|
1297
1223
|
<auro-accordion alignRight>
|
|
1298
|
-
|
|
1224
|
+
<span slot="trigger">See code</span>
|
|
1299
1225
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/aria-label-input-clear.html) -->
|
|
1300
1226
|
<!-- The below code snippet is automatically added from ./../apiExamples/aria-label-input-clear.html -->
|
|
1301
1227
|
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
</auro-datepicker>
|
|
1310
|
-
```
|
|
1228
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker>
|
|
1229
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1230
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
1231
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1232
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1233
|
+
<span slot="ariaLabel.input.clear">Custom Clear Input Button</span>
|
|
1234
|
+
</auro-datepicker></code></pre>
|
|
1311
1235
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1312
1236
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/snowflake/aria-label-input-clear.html) -->
|
|
1313
1237
|
<!-- The below code snippet is automatically added from ./../apiExamples/snowflake/aria-label-input-clear.html -->
|
|
1314
1238
|
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
</auro-datepicker>
|
|
1324
|
-
```
|
|
1239
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker layout="snowflake" shape="snowflake" ondark placeholder="MM/DD/YYYY">
|
|
1240
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1241
|
+
<span slot="label">Date</span>
|
|
1242
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
1243
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1244
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1245
|
+
<span slot="ariaLabel.input.clear">Snowflake Clear Input Button</span>
|
|
1246
|
+
</auro-datepicker></code></pre>
|
|
1325
1247
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1326
1248
|
</auro-accordion>
|
|
1327
1249
|
|
|
@@ -1334,29 +1256,27 @@ To view this demo, set your window to a mobile screen size.
|
|
|
1334
1256
|
**Note**: The previously supported `bib.fullscreen.dateLabel` slot is deprecated and will continue to work for backwards compatibility, but it is recommended to use the new `bib.fullscreen.fromLabel` and `bib.fullscreen.toLabel` slots to apply a label for each input when in mobile layout.
|
|
1335
1257
|
|
|
1336
1258
|
<div class="exampleWrapper">
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1259
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
1260
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
1261
|
+
<auro-datepicker>
|
|
1262
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1263
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
1264
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1265
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1266
|
+
</auro-datepicker>
|
|
1267
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1346
1268
|
</div>
|
|
1347
1269
|
<auro-accordion alignRight>
|
|
1348
|
-
|
|
1270
|
+
<span slot="trigger">See code</span>
|
|
1349
1271
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
1350
1272
|
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
1351
1273
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
</auro-datepicker>
|
|
1359
|
-
```
|
|
1274
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker>
|
|
1275
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1276
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
1277
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1278
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1279
|
+
</auro-datepicker></code></pre>
|
|
1360
1280
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1361
1281
|
</auro-accordion>
|
|
1362
1282
|
|
|
@@ -1365,29 +1285,27 @@ To view this demo, set your window to a mobile screen size.
|
|
|
1365
1285
|
The `fromLabel` slot sets the label used for the input. When the `range` attribute is used this is the first of two inputs.
|
|
1366
1286
|
|
|
1367
1287
|
<div class="exampleWrapper">
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1288
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
1289
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
1290
|
+
<auro-datepicker>
|
|
1291
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1292
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
1293
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1294
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1295
|
+
</auro-datepicker>
|
|
1296
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1377
1297
|
</div>
|
|
1378
1298
|
<auro-accordion alignRight>
|
|
1379
|
-
|
|
1299
|
+
<span slot="trigger">See code</span>
|
|
1380
1300
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
1381
1301
|
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
1382
1302
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
</auro-datepicker>
|
|
1390
|
-
```
|
|
1303
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker>
|
|
1304
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1305
|
+
<span slot="bib.fullscreen.headline">Datepicker Headline</span>
|
|
1306
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1307
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1308
|
+
</auro-datepicker></code></pre>
|
|
1391
1309
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1392
1310
|
</auro-accordion>
|
|
1393
1311
|
|
|
@@ -1396,33 +1314,31 @@ The `fromLabel` slot sets the label used for the input. When the `range` attribu
|
|
|
1396
1314
|
The `toLabel` slot sets the label for the second input. Only for use with the `range` attribute.
|
|
1397
1315
|
|
|
1398
1316
|
<div class="exampleWrapper">
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1317
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/range.html) -->
|
|
1318
|
+
<!-- The below content is automatically added from ./../apiExamples/range.html -->
|
|
1319
|
+
<auro-datepicker range>
|
|
1320
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1321
|
+
<span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
|
|
1322
|
+
<span slot="fromLabel">Departure</span>
|
|
1323
|
+
<span slot="toLabel">Return</span>
|
|
1324
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
1325
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
1326
|
+
</auro-datepicker>
|
|
1327
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1410
1328
|
</div>
|
|
1411
1329
|
<auro-accordion alignRight>
|
|
1412
|
-
|
|
1330
|
+
<span slot="trigger">See code</span>
|
|
1413
1331
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/range.html) -->
|
|
1414
1332
|
<!-- The below code snippet is automatically added from ./../apiExamples/range.html -->
|
|
1415
1333
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
</auro-datepicker>
|
|
1425
|
-
```
|
|
1334
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker range>
|
|
1335
|
+
<span slot="ariaLabel.bib.close">Close Calendar</span>
|
|
1336
|
+
<span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
|
|
1337
|
+
<span slot="fromLabel">Departure</span>
|
|
1338
|
+
<span slot="toLabel">Return</span>
|
|
1339
|
+
<span slot="bib.fullscreen.fromLabel">Departure</span>
|
|
1340
|
+
<span slot="bib.fullscreen.toLabel">Return</span>
|
|
1341
|
+
</auro-datepicker></code></pre>
|
|
1426
1342
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1427
1343
|
</auro-accordion>
|
|
1428
1344
|
|
|
@@ -1431,29 +1347,27 @@ The `toLabel` slot sets the label for the second input. Only for use with the `r
|
|
|
1431
1347
|
Sets the help text displayed below the trigger. The `helpText` slot can be used to provide additional context for the combobox. When using the `error` attribute, the `helpText` slot can be used to describe the error.
|
|
1432
1348
|
|
|
1433
1349
|
<div class="exampleWrapper">
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1350
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/help-text.html) -->
|
|
1351
|
+
<!-- The below content is automatically added from ./../apiExamples/help-text.html -->
|
|
1352
|
+
<auro-datepicker>
|
|
1353
|
+
<span slot="bib.fullscreen.headline">helpText Example</span>
|
|
1354
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1355
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1356
|
+
<span slot="helpText">Choose a date must be today or earlier.</span>
|
|
1357
|
+
</auro-datepicker>
|
|
1358
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1443
1359
|
</div>
|
|
1444
1360
|
<auro-accordion alignRight>
|
|
1445
|
-
|
|
1361
|
+
<span slot="trigger">See code</span>
|
|
1446
1362
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/help-text.html) -->
|
|
1447
1363
|
<!-- The below code snippet is automatically added from ./../apiExamples/help-text.html -->
|
|
1448
1364
|
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
</auro-datepicker>
|
|
1456
|
-
```
|
|
1365
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker>
|
|
1366
|
+
<span slot="bib.fullscreen.headline">helpText Example</span>
|
|
1367
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1368
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1369
|
+
<span slot="helpText">Choose a date must be today or earlier.</span>
|
|
1370
|
+
</auro-datepicker></code></pre>
|
|
1457
1371
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1458
1372
|
</auro-accordion>
|
|
1459
1373
|
|
|
@@ -1468,41 +1382,39 @@ Slot content support is limited to text only and a maximum of five (5) character
|
|
|
1468
1382
|
Slot content can be styled using [inline styles](https://www.codecademy.com/article/html-inline-styles) or [CSS Parts](https://css-tricks.com/styling-in-the-shadow-dom-with-css-shadow-parts/) (`part="dateSlot"`).
|
|
1469
1383
|
|
|
1470
1384
|
<div class="exampleWrapper">
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1385
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/date-slot.html) -->
|
|
1386
|
+
<!-- The below content is automatically added from ./../apiExamples/date-slot.html -->
|
|
1387
|
+
<auro-datepicker centralDate="12/03/2023" minDate="12/04/2023" maxDate="12/09/2023">
|
|
1388
|
+
<span slot="bib.fullscreen.headline">dateSlot Example</span>
|
|
1389
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1390
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1391
|
+
<span slot="date_12_03_2023">Sold</span>
|
|
1392
|
+
<span highlight slot="date_12_04_2023">$89</span>
|
|
1393
|
+
<span slot="date_12_05_2023">$100</span>
|
|
1394
|
+
<span slot="date_12_06_2023">$2345</span>
|
|
1395
|
+
<span highlight slot="date_12_07_2023">$149</span>
|
|
1396
|
+
<span highlight slot="date_12_08_2023">$382</span>
|
|
1397
|
+
<span slot="date_12_09_2023">$560</span>
|
|
1398
|
+
</auro-datepicker>
|
|
1399
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1486
1400
|
</div>
|
|
1487
1401
|
<auro-accordion alignRight>
|
|
1488
|
-
|
|
1402
|
+
<span slot="trigger">See code</span>
|
|
1489
1403
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/date-slot.html) -->
|
|
1490
1404
|
<!-- The below code snippet is automatically added from ./../apiExamples/date-slot.html -->
|
|
1491
1405
|
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
</auro-datepicker>
|
|
1505
|
-
```
|
|
1406
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker centralDate="12/03/2023" minDate="12/04/2023" maxDate="12/09/2023">
|
|
1407
|
+
<span slot="bib.fullscreen.headline">dateSlot Example</span>
|
|
1408
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1409
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1410
|
+
<span slot="date_12_03_2023">Sold</span>
|
|
1411
|
+
<span highlight slot="date_12_04_2023">$89</span>
|
|
1412
|
+
<span slot="date_12_05_2023">$100</span>
|
|
1413
|
+
<span slot="date_12_06_2023">$2345</span>
|
|
1414
|
+
<span highlight slot="date_12_07_2023">$149</span>
|
|
1415
|
+
<span highlight slot="date_12_08_2023">$382</span>
|
|
1416
|
+
<span slot="date_12_09_2023">$560</span>
|
|
1417
|
+
</auro-datepicker></code></pre>
|
|
1506
1418
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1507
1419
|
</auro-accordion>
|
|
1508
1420
|
|
|
@@ -1513,41 +1425,39 @@ Custom content can be added to any day's `auro-popover` in the calendar using a
|
|
|
1513
1425
|
The popover slot is intended for use with calendar dates that are `disabled` (e.g. before minimum date or after maximum date).
|
|
1514
1426
|
|
|
1515
1427
|
<div class="exampleWrapper">
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1428
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/popover-slot.html) -->
|
|
1429
|
+
<!-- The below content is automatically added from ./../apiExamples/popover-slot.html -->
|
|
1430
|
+
<auro-datepicker centralDate="12/03/2023" minDate="12/04/2023" maxDate="12/09/2023">
|
|
1431
|
+
<span slot="bib.fullscreen.headline">Popover Slot Example</span>
|
|
1432
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1433
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1434
|
+
<span slot="popover_12_03_2023">Tickets for this day are sold out</span>
|
|
1435
|
+
<span slot="popover_12_04_2023">Tickets for this day are $89</span>
|
|
1436
|
+
<span slot="popover_12_05_2023">Tickets for this day are $100</span>
|
|
1437
|
+
<span slot="popover_12_06_2023">Tickets for this day are $2345</span>
|
|
1438
|
+
<span slot="popover_12_07_2023">Tickets for this day are $149</span>
|
|
1439
|
+
<span slot="popover_12_08_2023">Tickets for this day are $382</span>
|
|
1440
|
+
<span slot="popover_12_09_2023">Tickets for this day are $560</span>
|
|
1441
|
+
</auro-datepicker>
|
|
1442
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1531
1443
|
</div>
|
|
1532
1444
|
<auro-accordion alignRight>
|
|
1533
|
-
|
|
1445
|
+
<span slot="trigger">See code</span>
|
|
1534
1446
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/popover-slot.html) -->
|
|
1535
1447
|
<!-- The below code snippet is automatically added from ./../apiExamples/popover-slot.html -->
|
|
1536
1448
|
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
</auro-datepicker>
|
|
1550
|
-
```
|
|
1449
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker centralDate="12/03/2023" minDate="12/04/2023" maxDate="12/09/2023">
|
|
1450
|
+
<span slot="bib.fullscreen.headline">Popover Slot Example</span>
|
|
1451
|
+
<span slot="fromLabel">Choose a date</span>
|
|
1452
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1453
|
+
<span slot="popover_12_03_2023">Tickets for this day are sold out</span>
|
|
1454
|
+
<span slot="popover_12_04_2023">Tickets for this day are $89</span>
|
|
1455
|
+
<span slot="popover_12_05_2023">Tickets for this day are $100</span>
|
|
1456
|
+
<span slot="popover_12_06_2023">Tickets for this day are $2345</span>
|
|
1457
|
+
<span slot="popover_12_07_2023">Tickets for this day are $149</span>
|
|
1458
|
+
<span slot="popover_12_08_2023">Tickets for this day are $382</span>
|
|
1459
|
+
<span slot="popover_12_09_2023">Tickets for this day are $560</span>
|
|
1460
|
+
</auro-datepicker></code></pre>
|
|
1551
1461
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1552
1462
|
</auro-accordion>
|
|
1553
1463
|
|
|
@@ -1558,39 +1468,36 @@ The popover slot is intended for use with calendar dates that are `disabled` (e.
|
|
|
1558
1468
|
This example demonstrates data driven slot content for days in the calendar. In this example, the slot content is inserted into each `auro-calendar-cell` after the bib of the `auro-datepicker` is opened, simulating an API call on a dynamic data source.
|
|
1559
1469
|
|
|
1560
1470
|
<div class="exampleWrapper">
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1471
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dynamic-slot.html) -->
|
|
1472
|
+
<!-- The below content is automatically added from ./../apiExamples/dynamic-slot.html -->
|
|
1473
|
+
<auro-datepicker id="slotContentExample" centralDate="12/13/2023" minDate="12/13/2023" maxDate="01/18/2024" range>
|
|
1474
|
+
<span slot="bib.fullscreen.headline">dynamic slot Example</span>
|
|
1475
|
+
<span slot="fromLabel">Departure</span>
|
|
1476
|
+
<span slot="toLabel">Return</span>
|
|
1477
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1478
|
+
</auro-datepicker>
|
|
1479
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1570
1480
|
</div>
|
|
1571
1481
|
<auro-accordion alignRight>
|
|
1572
|
-
|
|
1482
|
+
<span slot="trigger">See code</span>
|
|
1573
1483
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamic-slot.html) -->
|
|
1574
1484
|
<!-- The below code snippet is automatically added from ./../apiExamples/dynamic-slot.html -->
|
|
1575
1485
|
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
</auro-datepicker>
|
|
1583
|
-
```
|
|
1486
|
+
<pre class="language-html"><code class="language-html"><auro-datepicker id="slotContentExample" centralDate="12/13/2023" minDate="12/13/2023" maxDate="01/18/2024" range>
|
|
1487
|
+
<span slot="bib.fullscreen.headline">dynamic slot Example</span>
|
|
1488
|
+
<span slot="fromLabel">Departure</span>
|
|
1489
|
+
<span slot="toLabel">Return</span>
|
|
1490
|
+
<span slot="bib.fullscreen.fromLabel">Choose a date</span>
|
|
1491
|
+
</auro-datepicker></code></pre>
|
|
1584
1492
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1585
1493
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamic-slot.js) -->
|
|
1586
1494
|
<!-- The below code snippet is automatically added from ./../apiExamples/dynamic-slot.js -->
|
|
1587
1495
|
|
|
1588
|
-
|
|
1589
|
-
export function populateSlotContentExample() {
|
|
1496
|
+
<pre class="language-js"><code class="language-js">export function populateSlotContentExample() {
|
|
1590
1497
|
const populateSlotContentExample = document.querySelector('#slotContentExample');
|
|
1591
|
-
|
|
1498
|
+
|
|
1592
1499
|
// Insert slot content when the datepicker has been opened
|
|
1593
|
-
populateSlotContentExample.addEventListener('auroDatePicker-toggled', (event)
|
|
1500
|
+
populateSlotContentExample.addEventListener('auroDatePicker-toggled', (event) => {
|
|
1594
1501
|
if (event.detail.expanded) {
|
|
1595
1502
|
// Array of object(s) containing key, value pairs defining what slot content to render
|
|
1596
1503
|
const data = [
|
|
@@ -1671,41 +1578,40 @@ export function populateSlotContentExample() {
|
|
|
1671
1578
|
{slot: 'popover', month: 1, day: 19, year: 2024, content: 'Tickets for this date are sold out'},
|
|
1672
1579
|
{slot: 'popover', month: 1, day: 20, year: 2024, content: 'Tickets for this date are sold out'}
|
|
1673
1580
|
];
|
|
1674
|
-
|
|
1581
|
+
|
|
1675
1582
|
// For each item in the array, parse the keys into an HTML element and insert it into the DOM
|
|
1676
|
-
data.forEach((item)
|
|
1583
|
+
data.forEach((item) => {
|
|
1677
1584
|
// Create the new element for the slot content
|
|
1678
1585
|
const slotElement = document.createElement('span');
|
|
1679
|
-
|
|
1586
|
+
|
|
1680
1587
|
if (item.month.toString().length === 1) {
|
|
1681
1588
|
item.month = `0` + item.month;
|
|
1682
1589
|
}
|
|
1683
|
-
|
|
1590
|
+
|
|
1684
1591
|
if (item.day.toString().length === 1) {
|
|
1685
1592
|
item.day = `0` + item.day;
|
|
1686
1593
|
}
|
|
1687
|
-
|
|
1594
|
+
|
|
1688
1595
|
// Create the slot name from the item's keys
|
|
1689
1596
|
const slotName = `${item.slot}_${item.month}_${item.day}_${item.year}`;
|
|
1690
|
-
|
|
1597
|
+
|
|
1691
1598
|
// Set the slot name and content
|
|
1692
1599
|
slotElement.setAttribute('slot', slotName);
|
|
1693
1600
|
slotElement.textContent = item.content;
|
|
1694
|
-
|
|
1601
|
+
|
|
1695
1602
|
// Set the 'highlight' attribute on date slot content
|
|
1696
|
-
if (item.slot === 'date'
|
|
1603
|
+
if (item.slot === 'date' && item.highlight) {
|
|
1697
1604
|
slotElement.setAttribute('highlight', item.highlight);
|
|
1698
1605
|
}
|
|
1699
|
-
|
|
1606
|
+
|
|
1700
1607
|
// Append the new element to the DOM
|
|
1701
1608
|
populateSlotContentExample.appendChild(slotElement);
|
|
1702
1609
|
});
|
|
1703
1610
|
}
|
|
1704
|
-
|
|
1611
|
+
|
|
1705
1612
|
populateSlotContentExample.pushSlotContent();
|
|
1706
1613
|
});
|
|
1707
|
-
}
|
|
1708
|
-
```
|
|
1614
|
+
}</code></pre>
|
|
1709
1615
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1710
1616
|
</auro-accordion>
|
|
1711
1617
|
|
|
@@ -1714,49 +1620,45 @@ export function populateSlotContentExample() {
|
|
|
1714
1620
|
The following example demonstrates the use of `<auro-datepicker>` within an `<auro-dialog>` component.
|
|
1715
1621
|
|
|
1716
1622
|
<div class="exampleWrapper">
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1623
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/in-dialog.html) -->
|
|
1624
|
+
<!-- The below content is automatically added from ./../apiExamples/in-dialog.html -->
|
|
1625
|
+
<div>
|
|
1626
|
+
<auro-button id="datepicker-dialog-opener">Datepicker in Dialog</auro-button>
|
|
1627
|
+
<auro-dialog id="datepicker-dialog">
|
|
1628
|
+
<span slot="bib.fullscreen.headline">inDialog Example</span>
|
|
1629
|
+
<span slot="header">Datepicker in Dialog</span>
|
|
1630
|
+
<div slot="content">
|
|
1631
|
+
<auro-datepicker />
|
|
1632
|
+
</div>
|
|
1633
|
+
</auro-dialog>
|
|
1634
|
+
</div>
|
|
1635
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1730
1636
|
</div>
|
|
1731
1637
|
<auro-accordion alignRight>
|
|
1732
|
-
|
|
1638
|
+
<span slot="trigger">See code</span>
|
|
1733
1639
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/in-dialog.html) -->
|
|
1734
1640
|
<!-- The below code snippet is automatically added from ./../apiExamples/in-dialog.html -->
|
|
1735
1641
|
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
</div>
|
|
1747
|
-
```
|
|
1642
|
+
<pre class="language-html"><code class="language-html"><div>
|
|
1643
|
+
<auro-button id="datepicker-dialog-opener">Datepicker in Dialog</auro-button>
|
|
1644
|
+
<auro-dialog id="datepicker-dialog">
|
|
1645
|
+
<span slot="bib.fullscreen.headline">inDialog Example</span>
|
|
1646
|
+
<span slot="header">Datepicker in Dialog</span>
|
|
1647
|
+
<div slot="content">
|
|
1648
|
+
<auro-datepicker />
|
|
1649
|
+
</div>
|
|
1650
|
+
</auro-dialog>
|
|
1651
|
+
</div></code></pre>
|
|
1748
1652
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1749
1653
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/in-dialog.js) -->
|
|
1750
1654
|
<!-- The below code snippet is automatically added from ./../apiExamples/in-dialog.js -->
|
|
1751
1655
|
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
document.querySelector("#datepicker-dialog-opener").addEventListener("click", () => {
|
|
1656
|
+
<pre class="language-js"><code class="language-js">export function inDialogExample() {
|
|
1657
|
+
document.querySelector("#datepicker-dialog-opener").addEventListener("click", () => {
|
|
1755
1658
|
const dialog = document.querySelector("#datepicker-dialog");
|
|
1756
1659
|
dialog.open = true;
|
|
1757
1660
|
});
|
|
1758
|
-
}
|
|
1759
|
-
```
|
|
1661
|
+
};</code></pre>
|
|
1760
1662
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1761
1663
|
</auro-accordion>
|
|
1762
1664
|
|
|
@@ -1765,46 +1667,43 @@ export function inDialogExample() {
|
|
|
1765
1667
|
The following example demonstrates the use of `<auro-datepicker>` within an `<auro-drawer>` component.
|
|
1766
1668
|
|
|
1767
1669
|
<div class="exampleWrapper">
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1670
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/in-drawer.html) -->
|
|
1671
|
+
<!-- The below content is automatically added from ./../apiExamples/in-drawer.html -->
|
|
1672
|
+
<div>
|
|
1673
|
+
<auro-button id="datepicker-drawer-opener">Datepicker in Drawer</auro-button>
|
|
1674
|
+
<auro-drawer id="datepicker-drawer">
|
|
1675
|
+
<span slot="header">Datepicker in Drawer</span>
|
|
1676
|
+
<div slot="content">
|
|
1677
|
+
<auro-datepicker>
|
|
1678
|
+
<span slot="bib.fullscreen.headline">inDrawer Example</span>
|
|
1679
|
+
</auro-datepicker>
|
|
1680
|
+
</div>
|
|
1681
|
+
</auro-drawer>
|
|
1682
|
+
</div>
|
|
1683
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1782
1684
|
</div>
|
|
1783
1685
|
<auro-accordion alignRight>
|
|
1784
|
-
|
|
1686
|
+
<span slot="trigger">See code</span>
|
|
1785
1687
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/in-drawer.html) -->
|
|
1786
1688
|
<!-- The below code snippet is automatically added from ./../apiExamples/in-drawer.html -->
|
|
1787
1689
|
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
</div>
|
|
1800
|
-
```
|
|
1690
|
+
<pre class="language-html"><code class="language-html"><div>
|
|
1691
|
+
<auro-button id="datepicker-drawer-opener">Datepicker in Drawer</auro-button>
|
|
1692
|
+
<auro-drawer id="datepicker-drawer">
|
|
1693
|
+
<span slot="header">Datepicker in Drawer</span>
|
|
1694
|
+
<div slot="content">
|
|
1695
|
+
<auro-datepicker>
|
|
1696
|
+
<span slot="bib.fullscreen.headline">inDrawer Example</span>
|
|
1697
|
+
</auro-datepicker>
|
|
1698
|
+
</div>
|
|
1699
|
+
</auro-drawer>
|
|
1700
|
+
</div></code></pre>
|
|
1801
1701
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1802
1702
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/in-drawer.js) -->
|
|
1803
1703
|
<!-- The below code snippet is automatically added from ./../apiExamples/in-drawer.js -->
|
|
1804
1704
|
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
document.querySelector("#datepicker-drawer-opener").addEventListener("click", () => {
|
|
1705
|
+
<pre class="language-js"><code class="language-js">export function inDrawerExample() {
|
|
1706
|
+
document.querySelector("#datepicker-drawer-opener").addEventListener("click", () => {
|
|
1808
1707
|
const drawer = document.querySelector("#datepicker-drawer");
|
|
1809
1708
|
if (drawer.hasAttribute('open')) {
|
|
1810
1709
|
drawer.removeAttribute('open');
|
|
@@ -1812,8 +1711,7 @@ export function inDrawerExample() {
|
|
|
1812
1711
|
drawer.setAttribute('open', true);
|
|
1813
1712
|
}
|
|
1814
1713
|
});
|
|
1815
|
-
}
|
|
1816
|
-
```
|
|
1714
|
+
};</code></pre>
|
|
1817
1715
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1818
1716
|
</auro-accordion>
|
|
1819
1717
|
|
|
@@ -1824,11 +1722,10 @@ The component may be restyled by changing the values of the following token(s).
|
|
|
1824
1722
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
|
|
1825
1723
|
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|
|
1826
1724
|
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1725
|
+
<pre class="language-scss"><code class="language-scss">/* stylelint-disable color-function-notation */
|
|
1726
|
+
|
|
1830
1727
|
@use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
|
|
1831
|
-
|
|
1728
|
+
|
|
1832
1729
|
:host(:not([ondark])),
|
|
1833
1730
|
:host(:not([appearance="inverse"])) {
|
|
1834
1731
|
// datepicker
|
|
@@ -1836,7 +1733,7 @@ The component may be restyled by changing the values of the following token(s).
|
|
|
1836
1733
|
--ds-auro-datepicker-error-icon-color: var(--ds-basic-color-status-error, #{v.$ds-basic-color-status-error});
|
|
1837
1734
|
--ds-auro-datepicker-label-text-color: var(--ds-basic-color-texticon-muted, #{v.$ds-basic-color-texticon-muted});
|
|
1838
1735
|
--ds-auro-datepicker-outline-color: transparent;
|
|
1839
|
-
|
|
1736
|
+
|
|
1840
1737
|
// calendar
|
|
1841
1738
|
--ds-auro-calendar-mobile-header-container-color: var(--ds-basic-color-surface-default, #{v.$ds-basic-color-surface-default});
|
|
1842
1739
|
--ds-auro-calendar-mobile-header-divider-color: var(--ds-basic-color-border-divider, #{v.$ds-basic-color-border-divider});
|
|
@@ -1853,7 +1750,7 @@ The component may be restyled by changing the values of the following token(s).
|
|
|
1853
1750
|
--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
1854
1751
|
--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
1855
1752
|
}
|
|
1856
|
-
|
|
1753
|
+
|
|
1857
1754
|
:host([ondark]),
|
|
1858
1755
|
:host([appearance="inverse"]) {
|
|
1859
1756
|
// datepicker
|
|
@@ -1861,7 +1758,7 @@ The component may be restyled by changing the values of the following token(s).
|
|
|
1861
1758
|
--ds-auro-datepicker-error-icon-color: var(--ds-advanced-color-state-error-inverse, #{v.$ds-advanced-color-state-error-inverse});
|
|
1862
1759
|
--ds-auro-datepicker-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #{v.$ds-basic-color-texticon-inverse-muted});
|
|
1863
1760
|
--ds-auro-datepicker-outline-color: transparent;
|
|
1864
|
-
|
|
1761
|
+
|
|
1865
1762
|
// calendar
|
|
1866
1763
|
--ds-auro-calendar-mobile-header-container-color: var(--ds-basic-color-surface-default, #{v.$ds-basic-color-surface-default});
|
|
1867
1764
|
--ds-auro-calendar-mobile-header-divider-color: var(--ds-basic-color-border-divider, #{v.$ds-basic-color-border-divider});
|
|
@@ -1877,6 +1774,5 @@ The component may be restyled by changing the values of the following token(s).
|
|
|
1877
1774
|
--ds-auro-calendar-cell-in-range-color: var(--ds-advanced-color-shared-background-muted, #{v.$ds-advanced-color-shared-background-muted});
|
|
1878
1775
|
--ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
1879
1776
|
--ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
1880
|
-
}
|
|
1881
|
-
```
|
|
1777
|
+
}</code></pre>
|
|
1882
1778
|
<!-- AURO-GENERATED-CONTENT:END -->
|