@aurodesignsystem-dev/auro-formkit 0.0.0-pr1001.0

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.
Files changed (297) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE +2 -0
  4. package/README.md +314 -0
  5. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +50 -0
  6. package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
  7. package/components/bibtemplate/dist/headerVersion.d.ts +2 -0
  8. package/components/bibtemplate/dist/iconVersion.d.ts +2 -0
  9. package/components/bibtemplate/dist/index.d.ts +2 -0
  10. package/components/bibtemplate/dist/index.js +1940 -0
  11. package/components/bibtemplate/dist/registered.js +1940 -0
  12. package/components/bibtemplate/dist/styles/color-css.d.ts +2 -0
  13. package/components/bibtemplate/dist/styles/style-css.d.ts +2 -0
  14. package/components/bibtemplate/dist/styles/tokens-css.d.ts +2 -0
  15. package/components/checkbox/README.md +142 -0
  16. package/components/checkbox/demo/api.html +61 -0
  17. package/components/checkbox/demo/api.js +17 -0
  18. package/components/checkbox/demo/api.md +436 -0
  19. package/components/checkbox/demo/api.min.js +1870 -0
  20. package/components/checkbox/demo/index.html +57 -0
  21. package/components/checkbox/demo/index.js +8 -0
  22. package/components/checkbox/demo/index.md +327 -0
  23. package/components/checkbox/demo/index.min.js +1845 -0
  24. package/components/checkbox/demo/readme.html +57 -0
  25. package/components/checkbox/demo/readme.md +142 -0
  26. package/components/checkbox/dist/auro-checkbox-group.d.ts +166 -0
  27. package/components/checkbox/dist/auro-checkbox.d.ts +136 -0
  28. package/components/checkbox/dist/helptextVersion.d.ts +2 -0
  29. package/components/checkbox/dist/index.d.ts +3 -0
  30. package/components/checkbox/dist/index.js +1794 -0
  31. package/components/checkbox/dist/registered.js +1795 -0
  32. package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +2 -0
  33. package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +2 -0
  34. package/components/checkbox/dist/styles/color-css.d.ts +2 -0
  35. package/components/checkbox/dist/styles/colorGroup-css.d.ts +2 -0
  36. package/components/checkbox/dist/styles/tokens-css.d.ts +2 -0
  37. package/components/combobox/README.md +154 -0
  38. package/components/combobox/demo/api.html +63 -0
  39. package/components/combobox/demo/api.js +36 -0
  40. package/components/combobox/demo/api.md +1326 -0
  41. package/components/combobox/demo/api.min.js +18691 -0
  42. package/components/combobox/demo/index.html +63 -0
  43. package/components/combobox/demo/index.js +26 -0
  44. package/components/combobox/demo/index.md +725 -0
  45. package/components/combobox/demo/index.min.js +18545 -0
  46. package/components/combobox/demo/readme.html +57 -0
  47. package/components/combobox/demo/readme.md +154 -0
  48. package/components/combobox/dist/auro-combobox.d.ts +434 -0
  49. package/components/combobox/dist/bibtemplateVersion.d.ts +2 -0
  50. package/components/combobox/dist/dropdownVersion.d.ts +2 -0
  51. package/components/combobox/dist/index.d.ts +2 -0
  52. package/components/combobox/dist/index.js +16999 -0
  53. package/components/combobox/dist/inputVersion.d.ts +2 -0
  54. package/components/combobox/dist/registered.js +17001 -0
  55. package/components/combobox/dist/styles/emphasized/style-css.d.ts +2 -0
  56. package/components/combobox/dist/styles/snowflake/style-css.d.ts +2 -0
  57. package/components/combobox/dist/styles/style-css.d.ts +2 -0
  58. package/components/counter/README.md +146 -0
  59. package/components/counter/demo/api.html +61 -0
  60. package/components/counter/demo/api.js +20 -0
  61. package/components/counter/demo/api.md +730 -0
  62. package/components/counter/demo/api.min.js +10406 -0
  63. package/components/counter/demo/index.html +61 -0
  64. package/components/counter/demo/index.js +21 -0
  65. package/components/counter/demo/index.md +401 -0
  66. package/components/counter/demo/index.min.js +10370 -0
  67. package/components/counter/demo/readme.html +57 -0
  68. package/components/counter/demo/readme.md +146 -0
  69. package/components/counter/dist/auro-counter-button.d.ts +14 -0
  70. package/components/counter/dist/auro-counter-group.d.ts +386 -0
  71. package/components/counter/dist/auro-counter-wrapper.d.ts +22 -0
  72. package/components/counter/dist/auro-counter.d.ts +113 -0
  73. package/components/counter/dist/bibtemplateVersion.d.ts +2 -0
  74. package/components/counter/dist/dropdownVersion.d.ts +2 -0
  75. package/components/counter/dist/helptextVersion.d.ts +2 -0
  76. package/components/counter/dist/iconVersion.d.ts +2 -0
  77. package/components/counter/dist/index.d.ts +3 -0
  78. package/components/counter/dist/index.js +10313 -0
  79. package/components/counter/dist/registered.js +10314 -0
  80. package/components/counter/dist/styles/color-css.d.ts +2 -0
  81. package/components/counter/dist/styles/counter-button-color-css.d.ts +2 -0
  82. package/components/counter/dist/styles/counter-button-css.d.ts +2 -0
  83. package/components/counter/dist/styles/counter-group-css.d.ts +2 -0
  84. package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +2 -0
  85. package/components/counter/dist/styles/counter-wrapper-css.d.ts +2 -0
  86. package/components/counter/dist/styles/shapeSize-css.d.ts +2 -0
  87. package/components/counter/dist/styles/style-css.d.ts +2 -0
  88. package/components/counter/dist/styles/tokens-css.d.ts +2 -0
  89. package/components/datepicker/README.md +141 -0
  90. package/components/datepicker/demo/api.html +63 -0
  91. package/components/datepicker/demo/api.js +35 -0
  92. package/components/datepicker/demo/api.md +1529 -0
  93. package/components/datepicker/demo/api.min.js +29755 -0
  94. package/components/datepicker/demo/index.html +62 -0
  95. package/components/datepicker/demo/index.js +19 -0
  96. package/components/datepicker/demo/index.md +204 -0
  97. package/components/datepicker/demo/index.min.js +29476 -0
  98. package/components/datepicker/demo/readme.html +57 -0
  99. package/components/datepicker/demo/readme.md +141 -0
  100. package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
  101. package/components/datepicker/dist/auro-calendar-month.d.ts +20 -0
  102. package/components/datepicker/dist/auro-calendar.d.ts +133 -0
  103. package/components/datepicker/dist/auro-datepicker.d.ts +625 -0
  104. package/components/datepicker/dist/bibtemplateVersion.d.ts +2 -0
  105. package/components/datepicker/dist/buttonVersion.d.ts +2 -0
  106. package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
  107. package/components/datepicker/dist/iconVersion.d.ts +2 -0
  108. package/components/datepicker/dist/index.d.ts +2 -0
  109. package/components/datepicker/dist/index.js +29406 -0
  110. package/components/datepicker/dist/inputVersion.d.ts +2 -0
  111. package/components/datepicker/dist/popoverVersion.d.ts +2 -0
  112. package/components/datepicker/dist/registered.js +29406 -0
  113. package/components/datepicker/dist/styles/classic/color-css.d.ts +2 -0
  114. package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
  115. package/components/datepicker/dist/styles/color-calendar-css.d.ts +2 -0
  116. package/components/datepicker/dist/styles/color-cell-css.d.ts +2 -0
  117. package/components/datepicker/dist/styles/color-css.d.ts +2 -0
  118. package/components/datepicker/dist/styles/color-month-css.d.ts +2 -0
  119. package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
  120. package/components/datepicker/dist/styles/snowflake/color-css.d.ts +2 -0
  121. package/components/datepicker/dist/styles/snowflake/style-css.d.ts +2 -0
  122. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +2 -0
  123. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +2 -0
  124. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +2 -0
  125. package/components/datepicker/dist/styles/style-css.d.ts +2 -0
  126. package/components/datepicker/dist/styles/tokens-css.d.ts +2 -0
  127. package/components/datepicker/dist/utilities.d.ts +78 -0
  128. package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
  129. package/components/datepicker/dist/utilitiesCalendarRender.d.ts +50 -0
  130. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +5 -0
  131. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +60 -0
  132. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +1 -0
  133. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +57 -0
  134. package/components/dropdown/README.md +144 -0
  135. package/components/dropdown/demo/api.html +63 -0
  136. package/components/dropdown/demo/api.js +21 -0
  137. package/components/dropdown/demo/api.md +1266 -0
  138. package/components/dropdown/demo/api.min.js +4442 -0
  139. package/components/dropdown/demo/index.html +61 -0
  140. package/components/dropdown/demo/index.js +19 -0
  141. package/components/dropdown/demo/index.md +337 -0
  142. package/components/dropdown/demo/index.min.js +4405 -0
  143. package/components/dropdown/demo/readme.html +57 -0
  144. package/components/dropdown/demo/readme.md +144 -0
  145. package/components/dropdown/dist/auro-dropdown.d.ts +425 -0
  146. package/components/dropdown/dist/auro-dropdownBib.d.ts +68 -0
  147. package/components/dropdown/dist/dropdownVersion.d.ts +2 -0
  148. package/components/dropdown/dist/helptextVersion.d.ts +2 -0
  149. package/components/dropdown/dist/iconVersion.d.ts +2 -0
  150. package/components/dropdown/dist/index.d.ts +2 -0
  151. package/components/dropdown/dist/index.js +4350 -0
  152. package/components/dropdown/dist/registered.js +4350 -0
  153. package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +2 -0
  154. package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +2 -0
  155. package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
  156. package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
  157. package/components/dropdown/dist/styles/color-css.d.ts +2 -0
  158. package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
  159. package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
  160. package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
  161. package/components/dropdown/dist/styles/style-css.d.ts +2 -0
  162. package/components/dropdown/dist/styles/tokens-css.d.ts +2 -0
  163. package/components/form/README.md +142 -0
  164. package/components/form/demo/api.html +56 -0
  165. package/components/form/demo/api.js +3 -0
  166. package/components/form/demo/api.md +51 -0
  167. package/components/form/demo/api.min.js +638 -0
  168. package/components/form/demo/autocomplete.html +31 -0
  169. package/components/form/demo/index.html +57 -0
  170. package/components/form/demo/index.js +4 -0
  171. package/components/form/demo/index.md +403 -0
  172. package/components/form/demo/index.min.js +639 -0
  173. package/components/form/demo/readme.html +57 -0
  174. package/components/form/demo/readme.md +142 -0
  175. package/components/form/demo/registerDemoDeps.js +23 -0
  176. package/components/form/demo/working.html +124 -0
  177. package/components/form/dist/auro-form.d.ts +223 -0
  178. package/components/form/dist/index.d.ts +2 -0
  179. package/components/form/dist/index.js +614 -0
  180. package/components/form/dist/registered.d.ts +1 -0
  181. package/components/form/dist/registered.js +614 -0
  182. package/components/form/dist/styles/style-css.d.ts +2 -0
  183. package/components/helptext/dist/auro-helptext.d.ts +59 -0
  184. package/components/helptext/dist/index.d.ts +2 -0
  185. package/components/helptext/dist/index.js +207 -0
  186. package/components/helptext/dist/registered.js +207 -0
  187. package/components/helptext/dist/styles/color-css.d.ts +2 -0
  188. package/components/helptext/dist/styles/style-css.d.ts +2 -0
  189. package/components/helptext/dist/styles/tokens-css.d.ts +2 -0
  190. package/components/input/README.md +139 -0
  191. package/components/input/demo/api.html +48 -0
  192. package/components/input/demo/api.js +29 -0
  193. package/components/input/demo/api.md +1366 -0
  194. package/components/input/demo/api.min.js +8542 -0
  195. package/components/input/demo/index.html +49 -0
  196. package/components/input/demo/index.js +20 -0
  197. package/components/input/demo/index.md +270 -0
  198. package/components/input/demo/index.min.js +8461 -0
  199. package/components/input/demo/readme.html +57 -0
  200. package/components/input/demo/readme.md +139 -0
  201. package/components/input/dist/auro-input.d.ts +167 -0
  202. package/components/input/dist/base-input.d.ts +566 -0
  203. package/components/input/dist/buttonVersion.d.ts +2 -0
  204. package/components/input/dist/helptextVersion.d.ts +2 -0
  205. package/components/input/dist/i18n.d.ts +18 -0
  206. package/components/input/dist/iconVersion.d.ts +2 -0
  207. package/components/input/dist/index.d.ts +2 -0
  208. package/components/input/dist/index.js +8367 -0
  209. package/components/input/dist/registered.js +8367 -0
  210. package/components/input/dist/styles/classic/color-css.d.ts +2 -0
  211. package/components/input/dist/styles/classic/style-css.d.ts +2 -0
  212. package/components/input/dist/styles/color-css.d.ts +2 -0
  213. package/components/input/dist/styles/default/borders-css.d.ts +2 -0
  214. package/components/input/dist/styles/default/color-css.d.ts +2 -0
  215. package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
  216. package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
  217. package/components/input/dist/styles/default/style-css.d.ts +2 -0
  218. package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
  219. package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
  220. package/components/input/dist/styles/mixins-css.d.ts +2 -0
  221. package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
  222. package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
  223. package/components/input/dist/styles/style-css.d.ts +2 -0
  224. package/components/input/dist/styles/tokens-css.d.ts +2 -0
  225. package/components/input/dist/utilities.d.ts +25 -0
  226. package/components/layoutElement/dist/auroElement.d.ts +34 -0
  227. package/components/layoutElement/dist/index.d.ts +2 -0
  228. package/components/layoutElement/dist/index.js +98 -0
  229. package/components/layoutElement/dist/registered.js +98 -0
  230. package/components/menu/README.md +145 -0
  231. package/components/menu/demo/api.html +62 -0
  232. package/components/menu/demo/api.js +27 -0
  233. package/components/menu/demo/api.md +1011 -0
  234. package/components/menu/demo/api.min.js +1762 -0
  235. package/components/menu/demo/index.html +58 -0
  236. package/components/menu/demo/index.js +28 -0
  237. package/components/menu/demo/index.md +61 -0
  238. package/components/menu/demo/index.min.js +1708 -0
  239. package/components/menu/demo/readme.html +57 -0
  240. package/components/menu/demo/readme.md +145 -0
  241. package/components/menu/dist/auro-menu-utils.d.ts +34 -0
  242. package/components/menu/dist/auro-menu.d.ts +246 -0
  243. package/components/menu/dist/auro-menuoption.d.ts +81 -0
  244. package/components/menu/dist/dropdownVersion.d.ts +2 -0
  245. package/components/menu/dist/iconVersion.d.ts +2 -0
  246. package/components/menu/dist/index.d.ts +4 -0
  247. package/components/menu/dist/index.js +1691 -0
  248. package/components/menu/dist/registered.js +1651 -0
  249. package/components/menu/dist/styles/default/color-menu-css.d.ts +2 -0
  250. package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
  251. package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
  252. package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
  253. package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
  254. package/components/radio/README.md +137 -0
  255. package/components/radio/demo/api.html +59 -0
  256. package/components/radio/demo/api.js +19 -0
  257. package/components/radio/demo/api.md +602 -0
  258. package/components/radio/demo/api.min.js +1951 -0
  259. package/components/radio/demo/index.html +56 -0
  260. package/components/radio/demo/index.js +8 -0
  261. package/components/radio/demo/index.md +150 -0
  262. package/components/radio/demo/index.min.js +1908 -0
  263. package/components/radio/demo/readme.html +57 -0
  264. package/components/radio/demo/readme.md +137 -0
  265. package/components/radio/dist/auro-radio-group.d.ts +194 -0
  266. package/components/radio/dist/auro-radio.d.ts +147 -0
  267. package/components/radio/dist/helptextVersion.d.ts +2 -0
  268. package/components/radio/dist/index.d.ts +3 -0
  269. package/components/radio/dist/index.js +1857 -0
  270. package/components/radio/dist/registered.js +1858 -0
  271. package/components/radio/dist/styles/auro-radio-group-css.d.ts +2 -0
  272. package/components/radio/dist/styles/color-css.d.ts +2 -0
  273. package/components/radio/dist/styles/groupColor-css.d.ts +2 -0
  274. package/components/radio/dist/styles/style-css.d.ts +2 -0
  275. package/components/radio/dist/styles/tokens-css.d.ts +2 -0
  276. package/components/select/README.md +145 -0
  277. package/components/select/demo/api.html +77 -0
  278. package/components/select/demo/api.js +35 -0
  279. package/components/select/demo/api.md +1413 -0
  280. package/components/select/demo/api.min.js +10502 -0
  281. package/components/select/demo/index.html +73 -0
  282. package/components/select/demo/index.js +9 -0
  283. package/components/select/demo/index.md +1151 -0
  284. package/components/select/demo/index.min.js +10390 -0
  285. package/components/select/demo/readme.html +57 -0
  286. package/components/select/demo/readme.md +145 -0
  287. package/components/select/dist/auro-select.d.ts +512 -0
  288. package/components/select/dist/bibtemplateVersion.d.ts +2 -0
  289. package/components/select/dist/dropdownVersion.d.ts +2 -0
  290. package/components/select/dist/helptextVersion.d.ts +2 -0
  291. package/components/select/dist/index.d.ts +2 -0
  292. package/components/select/dist/index.js +8898 -0
  293. package/components/select/dist/registered.js +8898 -0
  294. package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
  295. package/components/select/dist/styles/style-css.d.ts +2 -0
  296. package/components/select/dist/styles/tokens-css.d.ts +2 -0
  297. package/package.json +218 -0
@@ -0,0 +1,1529 @@
1
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/api.md) -->
2
+ <!-- The below content is automatically added from ./../docs/api.md -->
3
+
4
+ # auro-datepicker
5
+
6
+ ## Properties
7
+
8
+ | Property | Attribute | Modifiers | Type | Default | Description |
9
+ |-----------------------------------|-----------------------------------|-----------|------------|--------------------------------------------------|--------------------------------------------------|
10
+ | [autoPlacement](#autoPlacement) | `autoPlacement` | | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
11
+ | [calendarEndDate](#calendarEndDate) | `calendarEndDate` | | `string` | "undefined" | The last date that may be displayed in the calendar. |
12
+ | [calendarFocusDate](#calendarFocusDate) | `calendarFocusDate` | | `string` | "value" | The date that will first be visually rendered to the user in the calendar. |
13
+ | [calendarStartDate](#calendarStartDate) | `calendarStartDate` | | `string` | "undefined" | The first date that may be displayed in the calendar. |
14
+ | [centralDate](#centralDate) | `centralDate` | | `string` | | The date that determines the currently visible month. |
15
+ | [disabled](#disabled) | `disabled` | | `boolean` | false | If set, disables the datepicker. |
16
+ | [error](#error) | `error` | | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
17
+ | [format](#format) | `format` | | `string` | "mm/dd/yyyy" | Specifies the date format. The default is `mm/dd/yyyy`. |
18
+ | [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
19
+ | [hasError](#hasError) | | readonly | `boolean` | | |
20
+ | [hasFocus](#hasFocus) | `hasFocus` | | `boolean` | | |
21
+ | [inputmode](#inputmode) | `inputmode` | | `string` | | Exposes inputmode attribute for input. |
22
+ | [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | | `boolean` | false | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
23
+ | [layout](#layout) | | | `string` | "classic" | |
24
+ | [maxDate](#maxDate) | `maxDate` | | `string` | | Maximum date. All dates after will be disabled. |
25
+ | [minDate](#minDate) | `minDate` | | `string` | | Minimum date. All dates before will be disabled. |
26
+ | [monthNames](#monthNames) | `monthNames` | | `array` | ["January","February","March","April","May","June","July","August","September","October","November","December"] | Names of all 12 months to render in the calendar, used for localization of date string in mobile layout. |
27
+ | [noFlip](#noFlip) | `noFlip` | | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
28
+ | [noValidate](#noValidate) | `noValidate` | | `boolean` | false | If set, disables auto-validation on blur. |
29
+ | [offset](#offset) | `offset` | | `number` | "0" | Gap between the trigger element and bib. |
30
+ | [onDark](#onDark) | `onDark` | | `boolean` | false | If declared, onDark styles will be applied to the trigger. |
31
+ | [placeholder](#placeholder) | `placeholder` | | `string` | | Placeholder text to display in the input(s) when no value is set. |
32
+ | [placeholderEndDate](#placeholderEndDate) | `placeholderEndDate` | | `string` | | Optional placeholder text to display in the second input when using date range.<br />By default, datepicker will use `placeholder` for both inputs if placeholder is<br />specified, but placeholderendDate is not. |
33
+ | [placement](#placement) | `placement` | | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
34
+ | [range](#range) | `range` | | `boolean` | false | If set, turns on date range functionality in auro-calendar. |
35
+ | [required](#required) | `required` | | `boolean` | false | Populates the `required` attribute on the input. Used for client-side validation. |
36
+ | [setCustomValidity](#setCustomValidity) | `setCustomValidity` | | `string` | | Sets a custom help text message to display for all validityStates. |
37
+ | [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | | `string` | | Custom help text message to display when validity = `customError`. |
38
+ | [setCustomValidityRangeOverflow](#setCustomValidityRangeOverflow) | `setCustomValidityRangeOverflow` | | `string` | | Custom help text message to display when validity = `rangeOverflow`. |
39
+ | [setCustomValidityRangeUnderflow](#setCustomValidityRangeUnderflow) | `setCustomValidityRangeUnderflow` | | `string` | | Custom help text message to display when validity = `rangeUnderflow`. |
40
+ | [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | | `string` | | Custom help text message to display when validity = `valueMissing`. |
41
+ | [shape](#shape) | | | `string` | "classic" | |
42
+ | [size](#size) | | | `string` | "lg" | |
43
+ | [stacked](#stacked) | `stacked` | | `boolean` | false | Set true to make datepicker stacked style. |
44
+ | [validity](#validity) | `validity` | | `string` | "undefined" | Specifies the `validityState` this element is in. |
45
+ | [value](#value) | `value` | | `string` | "undefined" | Value selected for the datepicker. |
46
+ | [valueEnd](#valueEnd) | `valueEnd` | | `string` | "undefined" | Value selected for the second datepicker when using date range. |
47
+ | [values](#values) | | readonly | `string[]` | | A convenience wrapper for `value` and `valueEnd`, uses the new Auro "array value pattern". |
48
+
49
+ ## Methods
50
+
51
+ | Method | Type | Description |
52
+ |-------------------------------|----------------------------------------|--------------------------------------------------|
53
+ | [clear](#clear) | `(): void` | Clears the current value(s) of the datepicker. |
54
+ | [focus](#focus) | `(focusInput?: string): void` | Focuses the datepicker trigger input.<br /><br />**focusInput**: Pass in `endDate` to focus on the return input. No parameter is needed to focus on the depart input. |
55
+ | [hideBib](#hideBib) | `(): void` | Hides the dropdown bib if its open. |
56
+ | [reset](#reset) | `(): void` | Resets component to initial state. |
57
+ | [resetInputs](#resetInputs) | `(): void` | Resets values without resetting validation. |
58
+ | [resetLayoutClasses](#resetLayoutClasses) | `(): void` | |
59
+ | [resetShapeClasses](#resetShapeClasses) | `(): void` | |
60
+ | [showBib](#showBib) | `(): void` | Shows the dropdown bib if there are options to show. |
61
+ | [updateComponentArchitecture](#updateComponentArchitecture) | `(): void` | |
62
+ | [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
63
+
64
+ ## Events
65
+
66
+ | Event | Type | Description |
67
+ |---------------------------------|--------------------------------------------------|--------------------------------------------------|
68
+ | `auroDatePicker-monthChanged` | `CustomEvent<{ month: any; year: any; numCalendars: any; }>` | Notifies that the visible calendar month(s) have changed. |
69
+ | `auroDatePicker-newSlotContent` | `CustomEvent<any>` | Notifies that new slot content has been added to the datepicker. |
70
+ | `auroDatePicker-toggled` | `CustomEvent<{ expanded: any; }>` | Notifies that the calendar dropdown has been opened/closed. |
71
+ | `auroDatePicker-valueSet` | | Notifies that the component has a new value set. |
72
+ | `auroFormElement-validated` | | Notifies that the component value(s) have been validated. |
73
+
74
+ ## Slots
75
+
76
+ | Name | Description |
77
+ |----------------------------|--------------------------------------------------|
78
+ | `ariaLabel.bib.close` | Sets aria-label on close button in fullscreen bib |
79
+ | `bib.fullscreen.dateLabel` | Defines the content to display above selected dates in the mobile layout. |
80
+ | `bib.fullscreen.headline` | Defines the headline to display above bib.fullscreen.dateLabels in the mobile layout. |
81
+ | `date_MM_DD_YYYY` | Defines the content to display in the auro-calendar-cell for the specified date. The content text is colored using the success state token when the `highlight` attribute is applied to the slot. |
82
+ | [fromLabel](#fromLabel) | Defines the label content for the first input. |
83
+ | [helpText](#helpText) | Defines the content of the helpText. |
84
+ | `popover_MM_DD_YYYY` | Defines the content to display in the auro-calendar-cell popover for the specified date. |
85
+ | [toLabel](#toLabel) | Defines the label content for the second input when the `range` attribute is used. |
86
+
87
+ ## CSS Shadow Parts
88
+
89
+ | Part | Description |
90
+ |-------------------|--------------------------------------------------|
91
+ | [calendar](#calendar) | Use for customizing the style of the calendar. |
92
+ | [calendarWrapper](#calendarWrapper) | Use for customizing the style of the calendar container. |
93
+ | [dropdown](#dropdown) | Use for customizing the style of the dropdown. |
94
+ | [helpText](#helpText) | Use for customizing the style of the datepicker help text. |
95
+ | [helpTextSpan](#helpTextSpan) | Use for customizing the style of the datepicker help text span. |
96
+ | [input](#input) | Use for customizing the style of the datepicker inputs. |
97
+ | [trigger](#trigger) | Use for customizing the style of the datepicker trigger. |
98
+ <!-- AURO-GENERATED-CONTENT:END -->
99
+
100
+ ## API Examples
101
+
102
+ ### Basic
103
+
104
+ <div class="exampleWrapper">
105
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
106
+ <!-- The below content is automatically added from ./../apiExamples/basic.html -->
107
+ <auro-datepicker required="">
108
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
109
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
110
+ <span slot="fromLabel">Choose a date</span>
111
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
112
+ </auro-datepicker>
113
+ <!-- AURO-GENERATED-CONTENT:END -->
114
+ </div>
115
+ <auro-accordion alignRight>
116
+ <span slot="trigger">See code</span>
117
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
118
+ <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
119
+
120
+ ```html
121
+ <auro-datepicker required="">
122
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
123
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
124
+ <span slot="fromLabel">Choose a date</span>
125
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
126
+ </auro-datepicker>
127
+ ```
128
+ <!-- AURO-GENERATED-CONTENT:END -->
129
+ </auro-accordion>
130
+
131
+ #### Basic Range
132
+
133
+ When used, the datepicker will display two inputs and the component will support selection of dates for a start and end date.
134
+
135
+ <div class="exampleWrapper">
136
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basicRange.html) -->
137
+ <!-- The below content is automatically added from ./../apiExamples/basicRange.html -->
138
+ <auro-datepicker range minDate="07/08/2025">
139
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
140
+ <span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
141
+ <span slot="fromLabel">Departure</span>
142
+ <span slot="toLabel">Return</span>
143
+ <span slot="bib.fullscreen.dateLabel">Roundtrip</span>
144
+ </auro-datepicker>
145
+ <!-- AURO-GENERATED-CONTENT:END -->
146
+ </div>
147
+ <auro-accordion alignRight>
148
+ <span slot="trigger">See code</span>
149
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basicRange.html) -->
150
+ <!-- The below code snippet is automatically added from ./../apiExamples/basicRange.html -->
151
+
152
+ ```html
153
+ <auro-datepicker range minDate="07/08/2025">
154
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
155
+ <span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
156
+ <span slot="fromLabel">Departure</span>
157
+ <span slot="toLabel">Return</span>
158
+ <span slot="bib.fullscreen.dateLabel">Roundtrip</span>
159
+ </auro-datepicker>
160
+ ```
161
+ <!-- AURO-GENERATED-CONTENT:END -->
162
+ </auro-accordion>
163
+
164
+ ### Attribute Examples
165
+
166
+ #### disabled
167
+
168
+ If set, disables the datepicker.
169
+
170
+ <div class="exampleWrapper">
171
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled.html) -->
172
+ <!-- The below content is automatically added from ./../apiExamples/disabled.html -->
173
+ <auro-datepicker disabled>
174
+ <span slot="fromLabel">Choose a date</span>
175
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
176
+ </auro-datepicker>
177
+ <!-- AURO-GENERATED-CONTENT:END -->
178
+ </div>
179
+ <auro-accordion alignRight>
180
+ <span slot="trigger">See code</span>
181
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled.html) -->
182
+ <!-- The below code snippet is automatically added from ./../apiExamples/disabled.html -->
183
+
184
+ ```html
185
+ <auro-datepicker disabled>
186
+ <span slot="fromLabel">Choose a date</span>
187
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
188
+ </auro-datepicker>
189
+ ```
190
+ <!-- AURO-GENERATED-CONTENT:END -->
191
+ </auro-accordion>
192
+
193
+ #### error
194
+
195
+ Use the `error` attribute to apply a persistent custom error that supersedes the HTML5 validation logic.
196
+
197
+ A custom error message can be set using the `error` attribute, or it can be used in conjuction with the `setCustomValidityCustomError` attribute.
198
+
199
+ <div class="exampleWrapper">
200
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/error.html) -->
201
+ <!-- The below content is automatically added from ./../apiExamples/error.html -->
202
+ <auro-datepicker error="Custom error message" id="errorExample">
203
+ <span slot="bib.fullscreen.headline">Error Example</span>
204
+ <span slot="fromLabel">Choose a date</span>
205
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
206
+ </auro-datepicker>
207
+ <auro-button id="undefinedValueExampleBtnAddError">Set Error</auro-button>
208
+ <auro-button id="undefinedValueExampleBtnRemoveError">Remove Error</auro-button>
209
+ <!-- AURO-GENERATED-CONTENT:END -->
210
+ </div>
211
+ <auro-accordion alignRight>
212
+ <span slot="trigger">See code</span>
213
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error.html) -->
214
+ <!-- The below code snippet is automatically added from ./../apiExamples/error.html -->
215
+
216
+ ```html
217
+ <auro-datepicker error="Custom error message" id="errorExample">
218
+ <span slot="bib.fullscreen.headline">Error Example</span>
219
+ <span slot="fromLabel">Choose a date</span>
220
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
221
+ </auro-datepicker>
222
+ <auro-button id="undefinedValueExampleBtnAddError">Set Error</auro-button>
223
+ <auro-button id="undefinedValueExampleBtnRemoveError">Remove Error</auro-button>
224
+ ```
225
+ <!-- AURO-GENERATED-CONTENT:END -->
226
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error.js) -->
227
+ <!-- The below code snippet is automatically added from ./../apiExamples/error.js -->
228
+
229
+ ```js
230
+ export function errorExample() {
231
+ const errorExample = document.querySelector('#errorExample');
232
+
233
+ document.querySelector('#undefinedValueExampleBtnAddError').addEventListener('click', () => {
234
+ errorExample.error = 'Custom New Error';
235
+ })
236
+
237
+ document.querySelector('#undefinedValueExampleBtnRemoveError').addEventListener('click', () => {
238
+ errorExample.removeAttribute('error');
239
+ })
240
+ }
241
+ ```
242
+ <!-- AURO-GENERATED-CONTENT:END -->
243
+ </auro-accordion>
244
+
245
+ #### Input Mode
246
+
247
+ You can manually set the input mode for the input.
248
+
249
+ <div class="exampleWrapper">
250
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/inputmode.html) -->
251
+ <!-- The below content is automatically added from ./../apiExamples/inputmode.html -->
252
+ <auro-datepicker inputmode="numeric">
253
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
254
+ <span slot="fromLabel">Choose a date</span>
255
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
256
+ </auro-datepicker>
257
+ <!-- AURO-GENERATED-CONTENT:END -->
258
+ </div>
259
+ <auro-accordion alignRight>
260
+ <span slot="trigger">See code</span>
261
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/inputmode.html) -->
262
+ <!-- The below code snippet is automatically added from ./../apiExamples/inputmode.html -->
263
+
264
+ ```html
265
+ <auro-datepicker inputmode="numeric">
266
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
267
+ <span slot="fromLabel">Choose a date</span>
268
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
269
+ </auro-datepicker>
270
+ ```
271
+ <!-- AURO-GENERATED-CONTENT:END -->
272
+ </auro-accordion>
273
+
274
+ #### calendarStartDate & calendarEndDate
275
+
276
+ The `calendarStartDate` and `calendarEndDate` properties may be used to explicitly control which calendar months _may_ be rendered in the calendar.
277
+
278
+ In <strong>desktop</strong>, the calendar month navigation will be restricted by these dates. In <strong>mobile</strong>, the following logic is used:
279
+
280
+ - if both `calendarStartDate` and `calendarEndDate` are defined: all months between, including these dates, will be rendered.
281
+ - If only `calendarStartDate` is defined: 12 months will be rendered starting with this value.
282
+ - if only `calendarEndDate` is defined: The current date month through the value of this attribute will be rendered.
283
+
284
+ 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`.
285
+
286
+ <div class="exampleWrapper">
287
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/calendarStartAndEndDate.html) -->
288
+ <!-- The below content is automatically added from ./../apiExamples/calendarStartAndEndDate.html -->
289
+ <auro-datepicker calendarStartDate="01/01/2022" calendarEndDate="06/01/2022">
290
+ <span slot="bib.fullscreen.headline">calendarStartDate & calendarEndDate Example</span>
291
+ <span slot="fromLabel">Choose a date</span>
292
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
293
+ </auro-datepicker>
294
+ <!-- AURO-GENERATED-CONTENT:END -->
295
+ </div>
296
+ <auro-accordion alignRight>
297
+ <span slot="trigger">See code</span>
298
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/calendarStartAndEndDate.html) -->
299
+ <!-- The below code snippet is automatically added from ./../apiExamples/calendarStartAndEndDate.html -->
300
+
301
+ ```html
302
+ <auro-datepicker calendarStartDate="01/01/2022" calendarEndDate="06/01/2022">
303
+ <span slot="bib.fullscreen.headline">calendarStartDate & calendarEndDate Example</span>
304
+ <span slot="fromLabel">Choose a date</span>
305
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
306
+ </auro-datepicker>
307
+ ```
308
+ <!-- AURO-GENERATED-CONTENT:END -->
309
+ </auro-accordion>
310
+
311
+ #### calendarFocusDate
312
+
313
+ The `calendarFocusDate` controls which calendar month is first presented to the user when they open the dropdown bib.
314
+
315
+ In <strong>desktop</strong> layout, the first month actually rendered will be the `calendarFocusDate` if defined. Once the user manually navigates the calendar to a different month, the calendar view will remain where the user left off when they close and reopen the bib. If the `calendarFocusDate` attribute is changed, this will re-render the calendar starting at the new date. If `calendarFocusDate` is undefined, the first rendered month will be the current date or the first renderable date defined by `calendarStartDate`.
316
+
317
+ 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.
318
+
319
+ <div class="exampleWrapper">
320
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/calendarFocusDate.html) -->
321
+ <!-- The below content is automatically added from ./../apiExamples/calendarFocusDate.html -->
322
+ <auro-datepicker calendarStartDate="01/01/2022" calendarEndDate="12/01/2023" calendarFocusDate="11/01/2022">
323
+ <span slot="bib.fullscreen.headline">calendarFocusDate Example</span>
324
+ <span slot="fromLabel">Choose a date</span>
325
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
326
+ </auro-datepicker>
327
+ <!-- AURO-GENERATED-CONTENT:END -->
328
+ </div>
329
+ <auro-accordion alignRight>
330
+ <span slot="trigger">See code</span>
331
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/calendarFocusDate.html) -->
332
+ <!-- The below code snippet is automatically added from ./../apiExamples/calendarFocusDate.html -->
333
+
334
+ ```html
335
+ <auro-datepicker calendarStartDate="01/01/2022" calendarEndDate="12/01/2023" calendarFocusDate="11/01/2022">
336
+ <span slot="bib.fullscreen.headline">calendarFocusDate Example</span>
337
+ <span slot="fromLabel">Choose a date</span>
338
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
339
+ </auro-datepicker>
340
+ ```
341
+ <!-- AURO-GENERATED-CONTENT:END -->
342
+ </auro-accordion>
343
+
344
+ #### centralDate
345
+
346
+ 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.
347
+
348
+ #### maxDate
349
+
350
+ 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.
351
+
352
+ <div class="exampleWrapper">
353
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/maxDate.html) -->
354
+ <!-- The below content is automatically added from ./../apiExamples/maxDate.html -->
355
+ <auro-datepicker maxDate="03/25/2023" setCustomValidityRangeOverflow="Selected date is later than maximum date.">
356
+ <span slot="bib.fullscreen.headline">maxDate Example</span>
357
+ <span slot="fromLabel">Choose a date</span>
358
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
359
+ </auro-datepicker>
360
+ <!-- AURO-GENERATED-CONTENT:END -->
361
+ </div>
362
+ <auro-accordion alignRight>
363
+ <span slot="trigger">See code</span>
364
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/maxDate.html) -->
365
+ <!-- The below code snippet is automatically added from ./../apiExamples/maxDate.html -->
366
+
367
+ ```html
368
+ <auro-datepicker maxDate="03/25/2023" setCustomValidityRangeOverflow="Selected date is later than maximum date.">
369
+ <span slot="bib.fullscreen.headline">maxDate Example</span>
370
+ <span slot="fromLabel">Choose a date</span>
371
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
372
+ </auro-datepicker>
373
+ ```
374
+ <!-- AURO-GENERATED-CONTENT:END -->
375
+ </auro-accordion>
376
+ Setting the `maxDate` attribute to a date earlier than the auro-datepicker `value` will result in the following changes to the component state:
377
+
378
+ * `value` will to reset to `undefined`.
379
+ * If the currently viewed calendar month is later than the new `maxDate`, the calendar view will move to the new `maxDate` month.
380
+
381
+ This example demonstrates that behavior.
382
+
383
+ <div class="exampleWrapper">
384
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/updateMaxDate.html) -->
385
+ <!-- The below content is automatically added from ./../apiExamples/updateMaxDate.html -->
386
+ <auro-datepicker id="maxDateExample" setCustomValidityRangeOverflow="Selected date is later than maximum date.">
387
+ <span slot="bib.fullscreen.headline">maxDate Example</span>
388
+ <span slot="fromLabel">Choose a date</span>
389
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
390
+ </auro-datepicker>
391
+ <auro-button id="maxDateChange">Change maxDate to Today's Date</auro-button>
392
+ <auro-button id="resetMaxDate">Reset Datepicker to Initial Example</auro-button>
393
+ <!-- AURO-GENERATED-CONTENT:END -->
394
+ </div>
395
+ <auro-accordion alignRight>
396
+ <span slot="trigger">See code</span>
397
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/updateMaxDate.html) -->
398
+ <!-- The below code snippet is automatically added from ./../apiExamples/updateMaxDate.html -->
399
+
400
+ ```html
401
+ <auro-datepicker id="maxDateExample" setCustomValidityRangeOverflow="Selected date is later than maximum date.">
402
+ <span slot="bib.fullscreen.headline">maxDate Example</span>
403
+ <span slot="fromLabel">Choose a date</span>
404
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
405
+ </auro-datepicker>
406
+ <auro-button id="maxDateChange">Change maxDate to Today's Date</auro-button>
407
+ <auro-button id="resetMaxDate">Reset Datepicker to Initial Example</auro-button>
408
+ ```
409
+ <!-- AURO-GENERATED-CONTENT:END -->
410
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/updateMaxDate.js) -->
411
+ <!-- The below code snippet is automatically added from ./../apiExamples/updateMaxDate.js -->
412
+
413
+ ```js
414
+ function formatDateString(date) {
415
+ /* eslint-disable prefer-template, no-magic-numbers */
416
+ const dd = String("0" + date.getDate()).slice(-2);
417
+ const mm = String("0" + (date.getMonth() + 1)).slice(-2);
418
+ /* eslint-enable prefer-template, no-magic-numbers */
419
+ const yyyy = date.getFullYear();
420
+
421
+ return `${mm}/${dd}/${yyyy}`;
422
+ }
423
+
424
+ export function updateMaxDateExample() {
425
+ const maxDateExample = document.getElementById('maxDateExample');
426
+ const changeMaxDateButton = document.getElementById('maxDateChange');
427
+ const resetButton = document.getElementById('resetMaxDate');
428
+
429
+ const today = formatDateString(new Date());
430
+
431
+ let nextWeek = new Date();
432
+ let addOneWeek = nextWeek.getDate() + 7;
433
+
434
+ nextWeek.setDate(addOneWeek);
435
+ nextWeek = formatDateString(nextWeek);
436
+
437
+ maxDateExample.setAttribute('value', nextWeek);
438
+ maxDateExample.setAttribute('maxDate', nextWeek);
439
+
440
+ changeMaxDateButton.addEventListener('click', () => {
441
+ maxDateExample.setAttribute('maxDate', today);
442
+ });
443
+
444
+ resetButton.addEventListener('click', () => {
445
+ maxDateExample.setAttribute('value', nextWeek);
446
+ maxDateExample.setAttribute('maxDate', nextWeek);
447
+ });
448
+ }
449
+ ```
450
+ <!-- AURO-GENERATED-CONTENT:END -->
451
+ </auro-accordion>
452
+
453
+ #### minDate
454
+
455
+ 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.
456
+
457
+ <div class="exampleWrapper">
458
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/minDate.html) -->
459
+ <!-- The below content is automatically added from ./../apiExamples/minDate.html -->
460
+ <auro-datepicker minDate="03/25/2028" setCustomValidityRangeUnderflow="Selected date is earlier than the minimum date.">
461
+ <span slot="bib.fullscreen.headline">minDate Example</span>
462
+ <span slot="fromLabel">Choose a date</span>
463
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
464
+ </auro-datepicker>
465
+ <!-- AURO-GENERATED-CONTENT:END -->
466
+ </div>
467
+ <auro-accordion alignRight>
468
+ <span slot="trigger">See code</span>
469
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/minDate.html) -->
470
+ <!-- The below code snippet is automatically added from ./../apiExamples/minDate.html -->
471
+
472
+ ```html
473
+ <auro-datepicker minDate="03/25/2028" setCustomValidityRangeUnderflow="Selected date is earlier than the minimum date.">
474
+ <span slot="bib.fullscreen.headline">minDate Example</span>
475
+ <span slot="fromLabel">Choose a date</span>
476
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
477
+ </auro-datepicker>
478
+ ```
479
+ <!-- AURO-GENERATED-CONTENT:END -->
480
+ </auro-accordion>
481
+ Setting the `minDate` attribute to a date later than the auro-datepicker `value` will result in the following changes to the component state:
482
+
483
+ * `value` will to reset to `undefined`.
484
+ * If the currently viewed calendar month is earlier than the new `minDate`, the calendar view will move to the new `minDate` month.
485
+
486
+ This example demonstrates that behavior.
487
+
488
+ <div class="exampleWrapper">
489
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/updateMinDate.html) -->
490
+ <!-- The below content is automatically added from ./../apiExamples/updateMinDate.html -->
491
+ <auro-datepicker id="minDateExample" setCustomValidityRangeUnderflow="Selected date is earlier than the minimum date.">
492
+ <span slot="bib.fullscreen.headline">minDate Example</span>
493
+ <span slot="fromLabel">Choose a date</span>
494
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
495
+ </auro-datepicker>
496
+ <auro-button id="minDateChange">Change minDate to a week from Today</auro-button>
497
+ <auro-button id="resetMinDate">Reset Datepicker to Initial Example</auro-button>
498
+ <!-- AURO-GENERATED-CONTENT:END -->
499
+ </div>
500
+ <auro-accordion alignRight>
501
+ <span slot="trigger">See code</span>
502
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/updateMinDate.html) -->
503
+ <!-- The below code snippet is automatically added from ./../apiExamples/updateMinDate.html -->
504
+
505
+ ```html
506
+ <auro-datepicker id="minDateExample" setCustomValidityRangeUnderflow="Selected date is earlier than the minimum date.">
507
+ <span slot="bib.fullscreen.headline">minDate Example</span>
508
+ <span slot="fromLabel">Choose a date</span>
509
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
510
+ </auro-datepicker>
511
+ <auro-button id="minDateChange">Change minDate to a week from Today</auro-button>
512
+ <auro-button id="resetMinDate">Reset Datepicker to Initial Example</auro-button>
513
+ ```
514
+ <!-- AURO-GENERATED-CONTENT:END -->
515
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/updateMinDate.js) -->
516
+ <!-- The below code snippet is automatically added from ./../apiExamples/updateMinDate.js -->
517
+
518
+ ```js
519
+ function formatDateString(date) {
520
+ /* eslint-disable prefer-template, no-magic-numbers */
521
+ const dd = String("0" + date.getDate()).slice(-2);
522
+ const mm = String("0" + (date.getMonth() + 1)).slice(-2);
523
+ /* eslint-enable prefer-template, no-magic-numbers */
524
+ const yyyy = date.getFullYear();
525
+
526
+ return `${mm}/${dd}/${yyyy}`;
527
+ }
528
+
529
+ export function updateMinDateExample() {
530
+ const minDateExample = document.getElementById('minDateExample');
531
+ const changeMinDateButton = document.getElementById('minDateChange');
532
+ const resetButton = document.getElementById('resetMinDate');
533
+
534
+ const today = formatDateString(new Date());
535
+
536
+ let nextWeek = new Date();
537
+ let addOneWeek = nextWeek.getDate() + 7;
538
+
539
+ nextWeek.setDate(addOneWeek);
540
+ nextWeek = formatDateString(nextWeek);
541
+
542
+ minDateExample.setAttribute('value', today);
543
+ minDateExample.setAttribute('minDate', today);
544
+
545
+ changeMinDateButton.addEventListener('click', () => {
546
+ minDateExample.setAttribute('minDate', nextWeek);
547
+ });
548
+
549
+ resetButton.addEventListener('click', () => {
550
+ minDateExample.setAttribute('value', today);
551
+ minDateExample.setAttribute('minDate', today);
552
+ });
553
+
554
+ }
555
+ ```
556
+ <!-- AURO-GENERATED-CONTENT:END -->
557
+ </auro-accordion>
558
+ </auro-accordion>
559
+
560
+ #### noValidate
561
+
562
+ When set, the datepicker will not validate when navigating away from the component.
563
+
564
+ <div class="exampleWrapper">
565
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/noValidate.html) -->
566
+ <!-- The below content is automatically added from ./../apiExamples/noValidate.html -->
567
+ <auro-datepicker required noValidate>
568
+ <span slot="bib.fullscreen.headline">noValidate Example</span>
569
+ <span slot="fromLabel">Choose a date</span>
570
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
571
+ </auro-datepicker>
572
+ <!-- AURO-GENERATED-CONTENT:END -->
573
+ </div>
574
+ <auro-accordion alignRight>
575
+ <span slot="trigger">See code</span>
576
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/noValidate.html) -->
577
+ <!-- The below code snippet is automatically added from ./../apiExamples/noValidate.html -->
578
+
579
+ ```html
580
+ <auro-datepicker required noValidate>
581
+ <span slot="bib.fullscreen.headline">noValidate Example</span>
582
+ <span slot="fromLabel">Choose a date</span>
583
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
584
+ </auro-datepicker>
585
+ ```
586
+ <!-- AURO-GENERATED-CONTENT:END -->
587
+ </auro-accordion>
588
+
589
+ #### required
590
+
591
+ Populates the `required` attribute on the input. Used for client-side validation.
592
+
593
+ 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.
594
+
595
+ <div class="exampleWrapper">
596
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/required.html) -->
597
+ <!-- The below content is automatically added from ./../apiExamples/required.html -->
598
+ <auro-datepicker required setCustomValidityValueMissing="Custom value missing message.">
599
+ <span slot="bib.fullscreen.headline">Required Example</span>
600
+ <span slot="fromLabel">Choose a date</span>
601
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
602
+ </auro-datepicker>
603
+ <auro-datepicker required range setCustomValidityValueMissing="Custom value missing message.">
604
+ <span slot="bib.fullscreen.headline">Required Example</span>
605
+ <span slot="fromLabel">Departure</span>
606
+ <span slot="toLabel">Return</span>
607
+ <span slot="bib.fullscreen.dateLabel">Roundtrip</span>
608
+ </auro-datepicker>
609
+ <!-- AURO-GENERATED-CONTENT:END -->
610
+ </div>
611
+ <auro-accordion alignRight>
612
+ <span slot="trigger">See code</span>
613
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/required.html) -->
614
+ <!-- The below code snippet is automatically added from ./../apiExamples/required.html -->
615
+
616
+ ```html
617
+ <auro-datepicker required setCustomValidityValueMissing="Custom value missing message.">
618
+ <span slot="bib.fullscreen.headline">Required Example</span>
619
+ <span slot="fromLabel">Choose a date</span>
620
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
621
+ </auro-datepicker>
622
+ <auro-datepicker required range setCustomValidityValueMissing="Custom value missing message.">
623
+ <span slot="bib.fullscreen.headline">Required Example</span>
624
+ <span slot="fromLabel">Departure</span>
625
+ <span slot="toLabel">Return</span>
626
+ <span slot="bib.fullscreen.dateLabel">Roundtrip</span>
627
+ </auro-datepicker>
628
+ ```
629
+ <!-- AURO-GENERATED-CONTENT:END -->
630
+ </auro-accordion>
631
+
632
+ #### stacked
633
+
634
+ Set stacked attribute to make range datepicker stacked style.
635
+
636
+ <div class="exampleWrapper">
637
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/stacked.html) -->
638
+ <!-- The below content is automatically added from ./../apiExamples/stacked.html -->
639
+ <auro-datepicker range stacked>
640
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
641
+ <span slot="fromLabel">Choose a date</span>
642
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
643
+ </auro-datepicker>
644
+ <!-- AURO-GENERATED-CONTENT:END -->
645
+ </div>
646
+ <auro-accordion alignRight>
647
+ <span slot="trigger">See code</span>
648
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/stacked.html) -->
649
+ <!-- The below code snippet is automatically added from ./../apiExamples/stacked.html -->
650
+
651
+ ```html
652
+ <auro-datepicker range stacked>
653
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
654
+ <span slot="fromLabel">Choose a date</span>
655
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
656
+ </auro-datepicker>
657
+ ```
658
+ <!-- AURO-GENERATED-CONTENT:END -->
659
+ </auro-accordion>
660
+
661
+ ### Customized bib position
662
+ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
663
+
664
+ - `placement` specifies the preferred position where the bib should appear relative to the trigger.
665
+ - `offset` sets the distance between the trigger and the bib.
666
+ - When `autoPlacement` is enabled, smart positioning logic is applied to determine the best placement for the bib. If all sides have sufficient space, the bib will appear in the position specified by `placement`.
667
+ - Unless `noFlip` is enabled, if there isn't enough space for the preferred `placement`, the bib will automatically flip to an alternative position.
668
+
669
+ <div class="exampleWrapper">
670
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/floaterConfig.html) -->
671
+ <!-- The below content is automatically added from ./../apiExamples/floaterConfig.html -->
672
+ <div style="width: 400px">
673
+ <auro-datepicker offset="20" placement="bottom-start" noFlip>
674
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
675
+ <span slot="fromLabel">bottom-start with 20px offset and noFlip</span>
676
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
677
+ </auro-datepicker>
678
+ <auro-datepicker offset="20" placement="bottom-start">
679
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
680
+ <span slot="fromLabel">bottom-start with 20px offset and flip</span>
681
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
682
+ </auro-datepicker>
683
+ <auro-datepicker offset="20" placement="right" autoPlacement noFlip>
684
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
685
+ <span slot="fromLabel">right with 20px offset, noFlip and autoPlacement</span>
686
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
687
+ </auro-datepicker>
688
+ </div>
689
+ <!-- AURO-GENERATED-CONTENT:END -->
690
+ </div>
691
+ <auro-accordion alignRight>
692
+ <span slot="trigger">See code</span>
693
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/floaterConfig.html) -->
694
+ <!-- The below code snippet is automatically added from ./../apiExamples/floaterConfig.html -->
695
+
696
+ ```html
697
+ <div style="width: 400px">
698
+ <auro-datepicker offset="20" placement="bottom-start" noFlip>
699
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
700
+ <span slot="fromLabel">bottom-start with 20px offset and noFlip</span>
701
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
702
+ </auro-datepicker>
703
+ <auro-datepicker offset="20" placement="bottom-start">
704
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
705
+ <span slot="fromLabel">bottom-start with 20px offset and flip</span>
706
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
707
+ </auro-datepicker>
708
+ <auro-datepicker offset="20" placement="right" autoPlacement noFlip>
709
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
710
+ <span slot="fromLabel">right with 20px offset, noFlip and autoPlacement</span>
711
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
712
+ </auro-datepicker>
713
+ </div>
714
+ ```
715
+ <!-- AURO-GENERATED-CONTENT:END -->
716
+ </auro-accordion>
717
+
718
+ #### validity
719
+
720
+ 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.
721
+
722
+ <div class="exampleWrapper">
723
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/validity.html) -->
724
+ <!-- The below content is automatically added from ./../apiExamples/validity.html -->
725
+ <auro-datepicker required id="validityExample">
726
+ <span slot="bib.fullscreen.headline">validity Example</span>
727
+ <span slot="fromLabel">Choose a date</span>
728
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
729
+ </auro-datepicker>
730
+ <auro-button id="validityExampleBtn">Get validity</auro-button>
731
+ <!-- AURO-GENERATED-CONTENT:END -->
732
+ </div>
733
+ <auro-accordion alignRight>
734
+ <span slot="trigger">See code</span>
735
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/validity.html) -->
736
+ <!-- The below code snippet is automatically added from ./../apiExamples/validity.html -->
737
+
738
+ ```html
739
+ <auro-datepicker required id="validityExample">
740
+ <span slot="bib.fullscreen.headline">validity Example</span>
741
+ <span slot="fromLabel">Choose a date</span>
742
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
743
+ </auro-datepicker>
744
+ <auro-button id="validityExampleBtn">Get validity</auro-button>
745
+ ```
746
+ <!-- AURO-GENERATED-CONTENT:END -->
747
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/validity.js) -->
748
+ <!-- The below code snippet is automatically added from ./../apiExamples/validity.js -->
749
+
750
+ ```js
751
+ export function validityExample() {
752
+ const validityExampleExample = document.querySelector('#validityExample');
753
+ const validityExampleExampleBtn = document.querySelector('#validityExampleBtn');
754
+
755
+ validityExampleExampleBtn.addEventListener('click', () => {
756
+ console.warn('Validity set to:', validityExampleExample.validity);
757
+ alert(`Validity set to: ${validityExampleExample.validity}`);
758
+ })
759
+ }
760
+ ```
761
+ <!-- AURO-GENERATED-CONTENT:END -->
762
+ </auro-accordion>
763
+
764
+ #### value
765
+
766
+ 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.
767
+
768
+ <div class="exampleWrapper">
769
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/value.html) -->
770
+ <!-- The below content is automatically added from ./../apiExamples/value.html -->
771
+ <auro-datepicker id="valueExample" value="02/02/2022">
772
+ <span slot="bib.fullscreen.headline">value Example</span>
773
+ <span slot="fromLabel">Choose a date</span>
774
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
775
+ </auro-datepicker>
776
+ <!-- AURO-GENERATED-CONTENT:END -->
777
+ </div>
778
+ <auro-accordion alignRight>
779
+ <span slot="trigger">See code</span>
780
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/value.html) -->
781
+ <!-- The below code snippet is automatically added from ./../apiExamples/value.html -->
782
+
783
+ ```html
784
+ <auro-datepicker id="valueExample" value="02/02/2022">
785
+ <span slot="bib.fullscreen.headline">value Example</span>
786
+ <span slot="fromLabel">Choose a date</span>
787
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
788
+ </auro-datepicker>
789
+ ```
790
+ <!-- AURO-GENERATED-CONTENT:END -->
791
+ </auro-accordion>
792
+
793
+ #### valueEnd
794
+
795
+ 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.
796
+
797
+ <div class="exampleWrapper">
798
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/valueEnd.html) -->
799
+ <!-- The below content is automatically added from ./../apiExamples/valueEnd.html -->
800
+ <auro-datepicker id="valueEndExample" range valueEnd="03/03/2023">
801
+ <span slot="bib.fullscreen.headline">valueEnd Example</span>
802
+ <span slot="fromLabel">Departure</span>
803
+ <span slot="toLabel">Return</span>
804
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
805
+ </auro-datepicker>
806
+ <!-- AURO-GENERATED-CONTENT:END -->
807
+ </div>
808
+ <auro-accordion alignRight>
809
+ <span slot="trigger">See code</span>
810
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueEnd.html) -->
811
+ <!-- The below code snippet is automatically added from ./../apiExamples/valueEnd.html -->
812
+
813
+ ```html
814
+ <auro-datepicker id="valueEndExample" range valueEnd="03/03/2023">
815
+ <span slot="bib.fullscreen.headline">valueEnd Example</span>
816
+ <span slot="fromLabel">Departure</span>
817
+ <span slot="toLabel">Return</span>
818
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
819
+ </auro-datepicker>
820
+ ```
821
+ <!-- AURO-GENERATED-CONTENT:END -->
822
+ </auro-accordion>
823
+
824
+ #### format
825
+
826
+ The `format` attribute is used to define the date format used by the datepicker. The default value is `mm/dd/yyyy`.
827
+
828
+ <div class="exampleWrapper">
829
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/format.html) -->
830
+ <!-- The below content is automatically added from ./../apiExamples/format.html -->
831
+ <auro-datepicker format="yyyy/mm/dd">
832
+ <span slot="bib.fullscreen.headline">Format Headline</span>
833
+ <span slot="fromLabel">Choose a date</span>
834
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
835
+ </auro-datepicker>
836
+ <!-- AURO-GENERATED-CONTENT:END -->
837
+ </div>
838
+ <auro-accordion alignRight>
839
+ <span slot="trigger">See code</span>
840
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/format.html) -->
841
+ <!-- The below code snippet is automatically added from ./../apiExamples/format.html -->
842
+
843
+ ```html
844
+ <auro-datepicker format="yyyy/mm/dd">
845
+ <span slot="bib.fullscreen.headline">Format Headline</span>
846
+ <span slot="fromLabel">Choose a date</span>
847
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
848
+ </auro-datepicker>
849
+ ```
850
+ <!-- AURO-GENERATED-CONTENT:END -->
851
+ </auro-accordion>
852
+
853
+ ### Method Examples
854
+
855
+ #### focus
856
+
857
+ The focus method will apply focus state to the datepicker's input field.
858
+
859
+ <div class="exampleWrapper">
860
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/focus.html) -->
861
+ <!-- The below content is automatically added from ./../apiExamples/focus.html -->
862
+ <auro-datepicker id="focusExampleElem" range>
863
+ <span slot="bib.fullscreen.headline">Focus Example</span>
864
+ <span slot="fromLabel">Departure</span>
865
+ <span slot="toLabel">Return</span>
866
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
867
+ </auro-datepicker>
868
+ <auro-button id="focusExampleBtn">Apply focus to datepicker</auro-button>
869
+ <auro-button id="focusExampleBtnTwo">Apply focus to the second input in datepicker</auro-button>
870
+ <!-- AURO-GENERATED-CONTENT:END -->
871
+ </div>
872
+ <auro-accordion alignRight>
873
+ <span slot="trigger">See code</span>
874
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/focus.html) -->
875
+ <!-- The below code snippet is automatically added from ./../apiExamples/focus.html -->
876
+
877
+ ```html
878
+ <auro-datepicker id="focusExampleElem" range>
879
+ <span slot="bib.fullscreen.headline">Focus Example</span>
880
+ <span slot="fromLabel">Departure</span>
881
+ <span slot="toLabel">Return</span>
882
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
883
+ </auro-datepicker>
884
+ <auro-button id="focusExampleBtn">Apply focus to datepicker</auro-button>
885
+ <auro-button id="focusExampleBtnTwo">Apply focus to the second input in datepicker</auro-button>
886
+ ```
887
+ <!-- AURO-GENERATED-CONTENT:END -->
888
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/focus.js) -->
889
+ <!-- The below code snippet is automatically added from ./../apiExamples/focus.js -->
890
+
891
+ ```js
892
+ export function focusExample() {
893
+ const focusExampleElem = document.querySelector('#focusExampleElem');
894
+ const focusExampleBtn = document.querySelector('#focusExampleBtn');
895
+ const focusExampleBtnTwo = document.querySelector('#focusExampleBtnTwo');
896
+
897
+ focusExampleBtn.addEventListener('click', () => {
898
+ focusExampleElem.focus();
899
+ });
900
+
901
+ focusExampleBtnTwo.addEventListener('click', () => {
902
+ focusExampleElem.focus('endDate');
903
+ });
904
+ }
905
+ ```
906
+ <!-- AURO-GENERATED-CONTENT:END -->
907
+ </auro-accordion>
908
+
909
+ ### Slot Examples
910
+
911
+ #### fromLabel
912
+
913
+ Sets the label used for the input. When the `range` attribute is used this is the first of two inputs.
914
+
915
+ <div class="exampleWrapper">
916
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
917
+ <!-- The below content is automatically added from ./../apiExamples/basic.html -->
918
+ <auro-datepicker required="">
919
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
920
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
921
+ <span slot="fromLabel">Choose a date</span>
922
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
923
+ </auro-datepicker>
924
+ <!-- AURO-GENERATED-CONTENT:END -->
925
+ </div>
926
+ <auro-accordion alignRight>
927
+ <span slot="trigger">See code</span>
928
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
929
+ <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
930
+
931
+ ```html
932
+ <auro-datepicker required="">
933
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
934
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
935
+ <span slot="fromLabel">Choose a date</span>
936
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
937
+ </auro-datepicker>
938
+ ```
939
+ <!-- AURO-GENERATED-CONTENT:END -->
940
+ </auro-accordion>
941
+
942
+ #### helpText
943
+
944
+ 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.
945
+
946
+ <div class="exampleWrapper">
947
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/helpText.html) -->
948
+ <!-- The below content is automatically added from ./../apiExamples/helpText.html -->
949
+ <auro-datepicker>
950
+ <span slot="bib.fullscreen.headline">helpText Example</span>
951
+ <span slot="fromLabel">Choose a date</span>
952
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
953
+ <span slot="helpText">Choose a date must be today or earlier.</span>
954
+ </auro-datepicker>
955
+ <!-- AURO-GENERATED-CONTENT:END -->
956
+ </div>
957
+ <auro-accordion alignRight>
958
+ <span slot="trigger">See code</span>
959
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/helpText.html) -->
960
+ <!-- The below code snippet is automatically added from ./../apiExamples/helpText.html -->
961
+
962
+ ```html
963
+ <auro-datepicker>
964
+ <span slot="bib.fullscreen.headline">helpText Example</span>
965
+ <span slot="fromLabel">Choose a date</span>
966
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
967
+ <span slot="helpText">Choose a date must be today or earlier.</span>
968
+ </auro-datepicker>
969
+ ```
970
+ <!-- AURO-GENERATED-CONTENT:END -->
971
+ </auro-accordion>
972
+
973
+ #### bib.fullscreen.dateLabel and bib.fullscreen.headline
974
+
975
+ Sets the headline and the label at the top of the bib when viewed in the mobile layout.
976
+ To view this demo, set your window to a mobile screen size.
977
+
978
+ <div class="exampleWrapper">
979
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
980
+ <!-- The below content is automatically added from ./../apiExamples/basic.html -->
981
+ <auro-datepicker required="">
982
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
983
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
984
+ <span slot="fromLabel">Choose a date</span>
985
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
986
+ </auro-datepicker>
987
+ <!-- AURO-GENERATED-CONTENT:END -->
988
+ </div>
989
+ <auro-accordion alignRight>
990
+ <span slot="trigger">See code</span>
991
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
992
+ <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
993
+
994
+ ```html
995
+ <auro-datepicker required="">
996
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
997
+ <span slot="bib.fullscreen.headline">Datepicker Headline</span>
998
+ <span slot="fromLabel">Choose a date</span>
999
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1000
+ </auro-datepicker>
1001
+ ```
1002
+ <!-- AURO-GENERATED-CONTENT:END -->
1003
+ </auro-accordion>
1004
+
1005
+ #### toLabel
1006
+
1007
+ Only for use with the `range` attribute. Sets the label for the second input.
1008
+
1009
+ <div class="exampleWrapper">
1010
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basicRange.html) -->
1011
+ <!-- The below content is automatically added from ./../apiExamples/basicRange.html -->
1012
+ <auro-datepicker range minDate="07/08/2025">
1013
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
1014
+ <span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
1015
+ <span slot="fromLabel">Departure</span>
1016
+ <span slot="toLabel">Return</span>
1017
+ <span slot="bib.fullscreen.dateLabel">Roundtrip</span>
1018
+ </auro-datepicker>
1019
+ <!-- AURO-GENERATED-CONTENT:END -->
1020
+ </div>
1021
+ <auro-accordion alignRight>
1022
+ <span slot="trigger">See code</span>
1023
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basicRange.html) -->
1024
+ <!-- The below code snippet is automatically added from ./../apiExamples/basicRange.html -->
1025
+
1026
+ ```html
1027
+ <auro-datepicker range minDate="07/08/2025">
1028
+ <span slot="ariaLabel.bib.close">Close Calendar</span>
1029
+ <span slot="bib.fullscreen.headline">Datepicker Range Headline</span>
1030
+ <span slot="fromLabel">Departure</span>
1031
+ <span slot="toLabel">Return</span>
1032
+ <span slot="bib.fullscreen.dateLabel">Roundtrip</span>
1033
+ </auro-datepicker>
1034
+ ```
1035
+ <!-- AURO-GENERATED-CONTENT:END -->
1036
+ </auro-accordion>
1037
+
1038
+ #### Date Slot
1039
+
1040
+ Custom content can be added to any day in the calendar using a `slot` named following the pattern `date_{MM}_{DD}_{YYYY}` (e.g. `date_01_08_2024`).
1041
+
1042
+ Adding the `highlight` attribute to the slot will change the slot content's color to `var(--ds-color-text-success-default)`.
1043
+
1044
+ Slot content support is limited to text only and a maximum of five (5) characters.
1045
+
1046
+ 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"`).
1047
+
1048
+ <div class="exampleWrapper">
1049
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dateSlot.html) -->
1050
+ <!-- The below content is automatically added from ./../apiExamples/dateSlot.html -->
1051
+ <auro-datepicker centralDate="12/03/2023" minDate="12/04/2023" maxDate="12/09/2023">
1052
+ <span slot="bib.fullscreen.headline">dateSlot Example</span>
1053
+ <span slot="fromLabel">Choose a date</span>
1054
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1055
+ <span slot="date_12_03_2023">Sold</span>
1056
+ <span highlight slot="date_12_04_2023">$89</span>
1057
+ <span slot="date_12_05_2023">$100</span>
1058
+ <span slot="date_12_06_2023">$2345</span>
1059
+ <span highlight slot="date_12_07_2023">$149</span>
1060
+ <span highlight slot="date_12_08_2023">$382</span>
1061
+ <span slot="date_12_09_2023">$560</span>
1062
+ </auro-datepicker>
1063
+ <!-- AURO-GENERATED-CONTENT:END -->
1064
+ </div>
1065
+ <auro-accordion alignRight>
1066
+ <span slot="trigger">See code</span>
1067
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dateSlot.html) -->
1068
+ <!-- The below code snippet is automatically added from ./../apiExamples/dateSlot.html -->
1069
+
1070
+ ```html
1071
+ <auro-datepicker centralDate="12/03/2023" minDate="12/04/2023" maxDate="12/09/2023">
1072
+ <span slot="bib.fullscreen.headline">dateSlot Example</span>
1073
+ <span slot="fromLabel">Choose a date</span>
1074
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1075
+ <span slot="date_12_03_2023">Sold</span>
1076
+ <span highlight slot="date_12_04_2023">$89</span>
1077
+ <span slot="date_12_05_2023">$100</span>
1078
+ <span slot="date_12_06_2023">$2345</span>
1079
+ <span highlight slot="date_12_07_2023">$149</span>
1080
+ <span highlight slot="date_12_08_2023">$382</span>
1081
+ <span slot="date_12_09_2023">$560</span>
1082
+ </auro-datepicker>
1083
+ ```
1084
+ <!-- AURO-GENERATED-CONTENT:END -->
1085
+ </auro-accordion>
1086
+
1087
+ #### Popover Slot
1088
+
1089
+ Custom content can be added to any day's `auro-popover` in the calendar using a `slot` named following the pattern `popover_{MM}_{DD}_{YYYY}` (e.g. `popover_01_08_2024`).
1090
+
1091
+ The popover slot is intended for use with calendar dates that are `disabled` (e.g. before minimum date or after maximum date).
1092
+
1093
+ <div class="exampleWrapper">
1094
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/popoverSlot.html) -->
1095
+ <!-- The below content is automatically added from ./../apiExamples/popoverSlot.html -->
1096
+ <auro-datepicker centralDate="12/03/2023" minDate="12/04/2023" maxDate="12/09/2023">
1097
+ <span slot="bib.fullscreen.headline">Popover Slot Example</span>
1098
+ <span slot="fromLabel">Choose a date</span>
1099
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1100
+ <span slot="popover_12_03_2023">Tickets for this day are sold out</span>
1101
+ <span slot="popover_12_04_2023">Tickets for this day are $89</span>
1102
+ <span slot="popover_12_05_2023">Tickets for this day are $100</span>
1103
+ <span slot="popover_12_06_2023">Tickets for this day are $2345</span>
1104
+ <span slot="popover_12_07_2023">Tickets for this day are $149</span>
1105
+ <span slot="popover_12_08_2023">Tickets for this day are $382</span>
1106
+ <span slot="popover_12_09_2023">Tickets for this day are $560</span>
1107
+ </auro-datepicker>
1108
+ <!-- AURO-GENERATED-CONTENT:END -->
1109
+ </div>
1110
+ <auro-accordion alignRight>
1111
+ <span slot="trigger">See code</span>
1112
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/popoverSlot.html) -->
1113
+ <!-- The below code snippet is automatically added from ./../apiExamples/popoverSlot.html -->
1114
+
1115
+ ```html
1116
+ <auro-datepicker centralDate="12/03/2023" minDate="12/04/2023" maxDate="12/09/2023">
1117
+ <span slot="bib.fullscreen.headline">Popover Slot Example</span>
1118
+ <span slot="fromLabel">Choose a date</span>
1119
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1120
+ <span slot="popover_12_03_2023">Tickets for this day are sold out</span>
1121
+ <span slot="popover_12_04_2023">Tickets for this day are $89</span>
1122
+ <span slot="popover_12_05_2023">Tickets for this day are $100</span>
1123
+ <span slot="popover_12_06_2023">Tickets for this day are $2345</span>
1124
+ <span slot="popover_12_07_2023">Tickets for this day are $149</span>
1125
+ <span slot="popover_12_08_2023">Tickets for this day are $382</span>
1126
+ <span slot="popover_12_09_2023">Tickets for this day are $560</span>
1127
+ </auro-datepicker>
1128
+ ```
1129
+ <!-- AURO-GENERATED-CONTENT:END -->
1130
+ </auro-accordion>
1131
+
1132
+ ### Functional Examples
1133
+
1134
+ #### Localization
1135
+
1136
+ The datepicker supports localized month names through the `monthNames` property.
1137
+
1138
+ This example demonstrates how to set the `monthNames` property to Korean month names, with a Korean date format.
1139
+
1140
+ <div class="exampleWrapper">
1141
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/localization.html) -->
1142
+ <!-- The below content is automatically added from ./../apiExamples/localization.html -->
1143
+ <auro-datepicker format="yyyy/mm/dd" id="localizationExample">
1144
+ <span slot="bib.fullscreen.headline">Localization Headline</span>
1145
+ <span slot="fromLabel">Choose a date</span>
1146
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1147
+ </auro-datepicker>
1148
+ <!-- AURO-GENERATED-CONTENT:END -->
1149
+ </div>
1150
+ <auro-accordion alignRight>
1151
+ <span slot="trigger">See code</span>
1152
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/localization.html) -->
1153
+ <!-- The below code snippet is automatically added from ./../apiExamples/localization.html -->
1154
+
1155
+ ```html
1156
+ <auro-datepicker format="yyyy/mm/dd" id="localizationExample">
1157
+ <span slot="bib.fullscreen.headline">Localization Headline</span>
1158
+ <span slot="fromLabel">Choose a date</span>
1159
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1160
+ </auro-datepicker>
1161
+ ```
1162
+ <!-- AURO-GENERATED-CONTENT:END -->
1163
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/localization.js) -->
1164
+ <!-- The below code snippet is automatically added from ./../apiExamples/localization.js -->
1165
+
1166
+ ```js
1167
+ export function localizationExample() {
1168
+ const localizedDatepicker = document.querySelector("#localizationExample");
1169
+
1170
+ localizedDatepicker.monthNames = ['일월', '이월', '삼월', '사월', '오월', '유월', '칠월', '팔월', '구월', '시월', '십일월', '십이월'];
1171
+ }
1172
+ ```
1173
+ <!-- AURO-GENERATED-CONTENT:END -->
1174
+ </auro-accordion>
1175
+
1176
+ #### Reset State
1177
+
1178
+ Use the `reset()` method to reset the `<auro-datepicker>`'s `value`, `valueEnd` and `validity` state. Doing so will preserve all other attributes and properties.
1179
+
1180
+ <div class="exampleWrapper">
1181
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/resetState.html) -->
1182
+ <!-- The below content is automatically added from ./../apiExamples/resetState.html -->
1183
+ <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.">
1184
+ <span slot="bib.fullscreen.headline">Reset Example</span>
1185
+ <span slot="fromLabel">Departure</span>
1186
+ <span slot="toLabel">Return</span>
1187
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1188
+ </auro-datepicker>
1189
+ <auro-button id="resetStateBtn">Reset</auro-button>
1190
+ <!-- AURO-GENERATED-CONTENT:END -->
1191
+ </div>
1192
+ <auro-accordion alignRight>
1193
+ <span slot="trigger">See code</span>
1194
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/resetState.html) -->
1195
+ <!-- The below code snippet is automatically added from ./../apiExamples/resetState.html -->
1196
+
1197
+ ```html
1198
+ <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.">
1199
+ <span slot="bib.fullscreen.headline">Reset Example</span>
1200
+ <span slot="fromLabel">Departure</span>
1201
+ <span slot="toLabel">Return</span>
1202
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1203
+ </auro-datepicker>
1204
+ <auro-button id="resetStateBtn">Reset</auro-button>
1205
+ ```
1206
+ <!-- AURO-GENERATED-CONTENT:END -->
1207
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/resetState.js) -->
1208
+ <!-- The below code snippet is automatically added from ./../apiExamples/resetState.js -->
1209
+
1210
+ ```js
1211
+ export function resetStateExample() {
1212
+ const elem = document.querySelector('#resetStateExample');
1213
+
1214
+ document.querySelector('#resetStateBtn').addEventListener('click', () => {
1215
+ elem.reset();
1216
+ });
1217
+ }
1218
+ ```
1219
+ <!-- AURO-GENERATED-CONTENT:END -->
1220
+ </auro-accordion>
1221
+
1222
+ #### Dynamic Slot Content
1223
+
1224
+ 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.
1225
+
1226
+ <div class="exampleWrapper">
1227
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dynamicSlot.html) -->
1228
+ <!-- The below content is automatically added from ./../apiExamples/dynamicSlot.html -->
1229
+ <auro-datepicker id="slotContentExample" centralDate="12/13/2023" minDate="12/13/2023" maxDate="01/18/2024" range>
1230
+ <span slot="bib.fullscreen.headline">dynamic slot Example</span>
1231
+ <span slot="fromLabel">Departure</span>
1232
+ <span slot="toLabel">Return</span>
1233
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1234
+ </auro-datepicker>
1235
+ <!-- AURO-GENERATED-CONTENT:END -->
1236
+ </div>
1237
+ <auro-accordion alignRight>
1238
+ <span slot="trigger">See code</span>
1239
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamicSlot.html) -->
1240
+ <!-- The below code snippet is automatically added from ./../apiExamples/dynamicSlot.html -->
1241
+
1242
+ ```html
1243
+ <auro-datepicker id="slotContentExample" centralDate="12/13/2023" minDate="12/13/2023" maxDate="01/18/2024" range>
1244
+ <span slot="bib.fullscreen.headline">dynamic slot Example</span>
1245
+ <span slot="fromLabel">Departure</span>
1246
+ <span slot="toLabel">Return</span>
1247
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1248
+ </auro-datepicker>
1249
+ ```
1250
+ <!-- AURO-GENERATED-CONTENT:END -->
1251
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamicSlot.js) -->
1252
+ <!-- The below code snippet is automatically added from ./../apiExamples/dynamicSlot.js -->
1253
+
1254
+ ```js
1255
+ export function populateSlotContentExample() {
1256
+ const populateSlotContentExample = document.querySelector('#slotContentExample');
1257
+
1258
+ // Insert slot content when the datepicker has been opened
1259
+ populateSlotContentExample.addEventListener('auroDatePicker-toggled', (event) => {
1260
+ if (event.detail.expanded) {
1261
+ // Array of object(s) containing key, value pairs defining what slot content to render
1262
+ const data = [
1263
+ {slot: 'date', month: 12, day: 1, year: 2023, content: 'Sold'},
1264
+ {slot: 'date', month: 12, day: 2, year: 2023, content: 'Sold'},
1265
+ {slot: 'date', month: 12, day: 3, year: 2023, content: 'Sold'},
1266
+ {slot: 'date', month: 12, day: 4, year: 2023, content: 'Sold'},
1267
+ {slot: 'date', month: 12, day: 5, year: 2023, content: 'Sold'},
1268
+ {slot: 'date', month: 12, day: 6, year: 2023, content: 'Sold'},
1269
+ {slot: 'date', month: 12, day: 7, year: 2023, content: 'Sold'},
1270
+ {slot: 'date', month: 12, day: 8, year: 2023, content: 'Sold'},
1271
+ {slot: 'date', month: 12, day: 9, year: 2023, content: 'Sold'},
1272
+ {slot: 'date', month: 12, day: 10, year: 2023, content: 'Sold'},
1273
+ {slot: 'date', month: 12, day: 11, year: 2023, content: 'Sold'},
1274
+ {slot: 'date', month: 12, day: 12, year: 2023, content: 'Sold'},
1275
+ {slot: 'date', month: 12, day: 13, year: 2023, content: '$560'},
1276
+ {slot: 'date', month: 12, day: 14, year: 2023, content: '$89', highlight: true},
1277
+ {slot: 'date', month: 12, day: 15, year: 2023, content: '$100'},
1278
+ {slot: 'date', month: 12, day: 16, year: 2023, content: '$2345'},
1279
+ {slot: 'date', month: 12, day: 17, year: 2023, content: '$2345'},
1280
+ {slot: 'date', month: 12, day: 18, year: 2023, content: '$2345'},
1281
+ {slot: 'date', month: 12, day: 19, year: 2023, content: '$2345'},
1282
+ {slot: 'date', month: 12, day: 20, year: 2023, content: '$2345'},
1283
+ {slot: 'date', month: 12, day: 21, year: 2023, content: '$2345'},
1284
+ {slot: 'date', month: 12, day: 22, year: 2023, content: '$2345'},
1285
+ {slot: 'date', month: 12, day: 23, year: 2023, content: '$2345'},
1286
+ {slot: 'date', month: 12, day: 24, year: 2023, content: '$2345'},
1287
+ {slot: 'date', month: 12, day: 25, year: 2023, content: '$2345'},
1288
+ {slot: 'date', month: 12, day: 26, year: 2023, content: '$2345'},
1289
+ {slot: 'date', month: 12, day: 27, year: 2023, content: '$2345'},
1290
+ {slot: 'date', month: 12, day: 28, year: 2023, content: '$2345'},
1291
+ {slot: 'date', month: 12, day: 29, year: 2023, content: '$2345'},
1292
+ {slot: 'date', month: 12, day: 30, year: 2023, content: '$2345'},
1293
+ {slot: 'date', month: 12, day: 31, year: 2023, content: '$2345'},
1294
+ {slot: 'date', month: 1, day: 14, year: 2024, content: '$83', highlight: true},
1295
+ {slot: 'date', month: 1, day: 15, year: 2024, content: '$203'},
1296
+ {slot: 'date', month: 1, day: 16, year: 2024, content: '$4444'},
1297
+ {slot: 'date', month: 1, day: 17, year: 2024, content: '$83', highlight: true},
1298
+ {slot: 'date', month: 1, day: 18, year: 2024, content: '$96', highlight: true},
1299
+ {slot: 'date', month: 1, day: 19, year: 2024, content: 'Sold'},
1300
+ {slot: 'date', month: 1, day: 20, year: 2024, content: 'Sold'},
1301
+ {slot: 'popover', month: 12, day: 1, year: 2023, content: 'Tickets for this date are sold out'},
1302
+ {slot: 'popover', month: 12, day: 2, year: 2023, content: 'Tickets for this date are sold out'},
1303
+ {slot: 'popover', month: 12, day: 3, year: 2023, content: 'Tickets for this date are sold out'},
1304
+ {slot: 'popover', month: 12, day: 4, year: 2023, content: 'Tickets for this date are sold out'},
1305
+ {slot: 'popover', month: 12, day: 5, year: 2023, content: 'Tickets for this date are sold out'},
1306
+ {slot: 'popover', month: 12, day: 6, year: 2023, content: 'Tickets for this date are sold out'},
1307
+ {slot: 'popover', month: 12, day: 7, year: 2023, content: 'Tickets for this date are sold out'},
1308
+ {slot: 'popover', month: 12, day: 8, year: 2023, content: 'Tickets for this date are sold out'},
1309
+ {slot: 'popover', month: 12, day: 9, year: 2023, content: 'Tickets for this date are sold out'},
1310
+ {slot: 'popover', month: 12, day: 10, year: 2023, content: 'Tickets for this date are sold out'},
1311
+ {slot: 'popover', month: 12, day: 11, year: 2023, content: 'Tickets for this date are sold out'},
1312
+ {slot: 'popover', month: 12, day: 12, year: 2023, content: 'Tickets for this date are sold out'},
1313
+ {slot: 'popover', month: 12, day: 13, year: 2023, content: 'Tickets for this date are $560'},
1314
+ {slot: 'popover', month: 12, day: 14, year: 2023, content: 'Tickets for this date are $89'},
1315
+ {slot: 'popover', month: 12, day: 15, year: 2023, content: 'Tickets for this date are $100'},
1316
+ {slot: 'popover', month: 12, day: 16, year: 2023, content: 'Tickets for this date are $2345'},
1317
+ {slot: 'popover', month: 12, day: 17, year: 2023, content: 'Tickets for this date are $2345'},
1318
+ {slot: 'popover', month: 12, day: 18, year: 2023, content: 'Tickets for this date are $2345'},
1319
+ {slot: 'popover', month: 12, day: 19, year: 2023, content: 'Tickets for this date are $2345'},
1320
+ {slot: 'popover', month: 12, day: 20, year: 2023, content: 'Tickets for this date are $2345'},
1321
+ {slot: 'popover', month: 12, day: 21, year: 2023, content: 'Tickets for this date are $2345'},
1322
+ {slot: 'popover', month: 12, day: 22, year: 2023, content: 'Tickets for this date are $2345'},
1323
+ {slot: 'popover', month: 12, day: 23, year: 2023, content: 'Tickets for this date are $2345'},
1324
+ {slot: 'popover', month: 12, day: 24, year: 2023, content: 'Tickets for this date are $2345'},
1325
+ {slot: 'popover', month: 12, day: 25, year: 2023, content: 'Tickets for this date are $2345'},
1326
+ {slot: 'popover', month: 12, day: 26, year: 2023, content: 'Tickets for this date are $2345'},
1327
+ {slot: 'popover', month: 12, day: 27, year: 2023, content: 'Tickets for this date are $2345'},
1328
+ {slot: 'popover', month: 12, day: 28, year: 2023, content: 'Tickets for this date are $2345'},
1329
+ {slot: 'popover', month: 12, day: 29, year: 2023, content: 'Tickets for this date are $2345'},
1330
+ {slot: 'popover', month: 12, day: 30, year: 2023, content: 'Tickets for this date are $2345'},
1331
+ {slot: 'popover', month: 12, day: 31, year: 2023, content: 'Tickets for this date are $2345'},
1332
+ {slot: 'popover', month: 1, day: 14, year: 2024, content: 'Tickets for this date are $83'},
1333
+ {slot: 'popover', month: 1, day: 15, year: 2024, content: 'Tickets for this date are $203'},
1334
+ {slot: 'popover', month: 1, day: 16, year: 2024, content: 'Tickets for this date are $4444'},
1335
+ {slot: 'popover', month: 1, day: 17, year: 2024, content: 'Tickets for this date are $83'},
1336
+ {slot: 'popover', month: 1, day: 18, year: 2024, content: 'Tickets for this date are $96'},
1337
+ {slot: 'popover', month: 1, day: 19, year: 2024, content: 'Tickets for this date are sold out'},
1338
+ {slot: 'popover', month: 1, day: 20, year: 2024, content: 'Tickets for this date are sold out'}
1339
+ ];
1340
+
1341
+ // For each item in the array, parse the keys into an HTML element and insert it into the DOM
1342
+ data.forEach((item) => {
1343
+ // Create the new element for the slot content
1344
+ const slotElement = document.createElement('span');
1345
+
1346
+ if (item.month.toString().length === 1) {
1347
+ item.month = `0` + item.month;
1348
+ }
1349
+
1350
+ if (item.day.toString().length === 1) {
1351
+ item.day = `0` + item.day;
1352
+ }
1353
+
1354
+ // Create the slot name from the item's keys
1355
+ const slotName = `${item.slot}_${item.month}_${item.day}_${item.year}`;
1356
+
1357
+ // Set the slot name and content
1358
+ slotElement.setAttribute('slot', slotName);
1359
+ slotElement.textContent = item.content;
1360
+
1361
+ // Set the 'highlight' attribute on date slot content
1362
+ if (item.slot === 'date' && item.highlight) {
1363
+ slotElement.setAttribute('highlight', item.highlight);
1364
+ }
1365
+
1366
+ // Append the new element to the DOM
1367
+ populateSlotContentExample.appendChild(slotElement);
1368
+ });
1369
+ }
1370
+
1371
+ populateSlotContentExample.pushSlotContent();
1372
+ });
1373
+ }
1374
+ ```
1375
+ <!-- AURO-GENERATED-CONTENT:END -->
1376
+ </auro-accordion>
1377
+
1378
+ ### Watch for value changes
1379
+
1380
+ 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.
1381
+
1382
+ <div class="exampleWrapper">
1383
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/alertValue.html) -->
1384
+ <!-- The below content is automatically added from ./../apiExamples/alertValue.html -->
1385
+ <auro-datepicker id="datePickerValueAlert">
1386
+ <span slot="bib.fullscreen.headline">Alert Value Example</span>
1387
+ <span slot="fromLabel">Choose a date</span>
1388
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1389
+ </auro-datepicker>
1390
+ <!-- AURO-GENERATED-CONTENT:END -->
1391
+ </div>
1392
+ <auro-accordion alignRight>
1393
+ <span slot="trigger">See code</span>
1394
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/alertValue.html) -->
1395
+ <!-- The below code snippet is automatically added from ./../apiExamples/alertValue.html -->
1396
+
1397
+ ```html
1398
+ <auro-datepicker id="datePickerValueAlert">
1399
+ <span slot="bib.fullscreen.headline">Alert Value Example</span>
1400
+ <span slot="fromLabel">Choose a date</span>
1401
+ <span slot="bib.fullscreen.dateLabel">Choose a date</span>
1402
+ </auro-datepicker>
1403
+ ```
1404
+ <!-- AURO-GENERATED-CONTENT:END -->
1405
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/alertValue.js) -->
1406
+ <!-- The below code snippet is automatically added from ./../apiExamples/alertValue.js -->
1407
+
1408
+ ```js
1409
+ export function alertValueExample() {
1410
+ const valueAlertExample = document.querySelector('#datePickerValueAlert');
1411
+
1412
+ valueAlertExample.addEventListener('auroDatePicker-valueSet', () => {
1413
+ console.warn('Select value changed to:', valueAlertExample.value);
1414
+ alert(`Select value changed to: ${valueAlertExample.value}`);
1415
+ })
1416
+ }
1417
+ ```
1418
+ <!-- AURO-GENERATED-CONTENT:END -->
1419
+ </auro-accordion>
1420
+
1421
+ #### in Dialog
1422
+
1423
+ The component can be in a dialog.
1424
+
1425
+ <div class="exampleWrapper">
1426
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/inDialog.html) -->
1427
+ <!-- The below content is automatically added from ./../apiExamples/inDialog.html -->
1428
+ <div>
1429
+ <auro-button id="datepicker-dialog-opener">Datepicker in Dialog</auro-button>
1430
+ <auro-dialog id="datepicker-dialog">
1431
+ <span slot="bib.fullscreen.headline">inDialog Example</span>
1432
+ <span slot="header">Datepicker in Dialog</span>
1433
+ <div slot="content">
1434
+ <auro-datepicker />
1435
+ </div>
1436
+ </auro-dialog>
1437
+ </div>
1438
+ <!-- AURO-GENERATED-CONTENT:END -->
1439
+ </div>
1440
+ <auro-accordion alignRight>
1441
+ <span slot="trigger">See code</span>
1442
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/inDialog.html) -->
1443
+ <!-- The below code snippet is automatically added from ./../apiExamples/inDialog.html -->
1444
+
1445
+ ```html
1446
+ <div>
1447
+ <auro-button id="datepicker-dialog-opener">Datepicker in Dialog</auro-button>
1448
+ <auro-dialog id="datepicker-dialog">
1449
+ <span slot="bib.fullscreen.headline">inDialog Example</span>
1450
+ <span slot="header">Datepicker in Dialog</span>
1451
+ <div slot="content">
1452
+ <auro-datepicker />
1453
+ </div>
1454
+ </auro-dialog>
1455
+ </div>
1456
+ ```
1457
+ <!-- AURO-GENERATED-CONTENT:END -->
1458
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/inDialog.js) -->
1459
+ <!-- The below code snippet is automatically added from ./../apiExamples/inDialog.js -->
1460
+
1461
+ ```js
1462
+ export function inDialogExample() {
1463
+ document.querySelector("#datepicker-dialog-opener").addEventListener("click", () => {
1464
+ const dialog = document.querySelector("#datepicker-dialog");
1465
+ dialog.open = true;
1466
+ });
1467
+ };
1468
+ ```
1469
+ <!-- AURO-GENERATED-CONTENT:END -->
1470
+ </auro-accordion>
1471
+
1472
+ ### Theme Support
1473
+
1474
+ The component may be restyled using the following code sample and changing the values of the following token(s).
1475
+
1476
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
1477
+ <!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
1478
+
1479
+ ```scss
1480
+ /* stylelint-disable color-function-notation */
1481
+
1482
+ @use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
1483
+
1484
+ :host(:not([ondark])) {
1485
+ // datepicker
1486
+ --ds-auro-datepicker-range-input-divider-color: var(--ds-basic-color-border-bold, #{v.$ds-basic-color-border-bold});
1487
+ --ds-auro-datepicker-error-icon-color: var(--ds-basic-color-status-error, #{v.$ds-basic-color-status-error});
1488
+ --ds-auro-datepicker-label-text-color: var(--ds-basic-color-texticon-muted, #{v.$ds-basic-color-texticon-muted});
1489
+
1490
+ // calendar
1491
+ --ds-auro-calendar-mobile-header-container-color: var(--ds-basic-color-surface-default, #{v.$ds-basic-color-surface-default});
1492
+ --ds-auro-calendar-mobile-header-divider-color: var(--ds-basic-color-border-divider, #{v.$ds-basic-color-border-divider});
1493
+ --ds-auro-calendar-mobile-header-text-color: var(--ds-basic-color-texticon-muted, #{v.$ds-basic-color-texticon-muted});
1494
+ --ds-auro-calendar-nav-btn-border-color: transparent;
1495
+ --ds-auro-calendar-nav-btn-chevron-color: var(--ds-basic-color-brand-primary, #{v.$ds-basic-color-brand-primary});
1496
+ --ds-auro-calendar-nav-btn-container-color: transparent;
1497
+ --ds-auro-calendar-month-container-color: var(--ds-basic-color-surface-default, #{v.$ds-basic-color-surface-default});
1498
+ --ds-auro-calendar-month-divider-color: var(--ds-basic-color-border-divider, #{v.$ds-basic-color-border-divider});
1499
+ --ds-auro-calendar-month-header-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
1500
+ --ds-auro-calendar-cell-border-color: transparent;
1501
+ --ds-auro-calendar-cell-container-color: transparent;
1502
+ --ds-auro-calendar-cell-in-range-color: var(--ds-advanced-color-shared-background-muted, #{v.$ds-advanced-color-shared-background-muted});
1503
+ --ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
1504
+ --ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
1505
+ }
1506
+
1507
+ :host([ondark]) {
1508
+ --ds-auro-datepicker-range-input-divider-color: var(--ds-basic-color-texticon-inverse-muted, #{v.$ds-basic-color-texticon-inverse-muted});
1509
+ --ds-auro-datepicker-error-icon-color: var(--ds-advanced-color-state-error-inverse, #{v.$ds-advanced-color-state-error-inverse});
1510
+ --ds-auro-datepicker-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #{v.$ds-basic-color-texticon-inverse-muted});
1511
+
1512
+ // calendar
1513
+ --ds-auro-calendar-mobile-header-container-color: var(--ds-basic-color-surface-default, #{v.$ds-basic-color-surface-default});
1514
+ --ds-auro-calendar-mobile-header-divider-color: var(--ds-basic-color-border-divider, #{v.$ds-basic-color-border-divider});
1515
+ --ds-auro-calendar-mobile-header-text-color: var(--ds-basic-color-texticon-muted, #{v.$ds-basic-color-texticon-muted});
1516
+ --ds-auro-calendar-nav-btn-border-color: transparent;
1517
+ --ds-auro-calendar-nav-btn-chevron-color: var(--ds-basic-color-brand-primary, #{v.$ds-basic-color-brand-primary});
1518
+ --ds-auro-calendar-nav-btn-container-color: transparent;
1519
+ --ds-auro-calendar-month-container-color: var(--ds-basic-color-surface-default, #{v.$ds-basic-color-surface-default});
1520
+ --ds-auro-calendar-month-divider-color: var(--ds-basic-color-border-divider, #{v.$ds-basic-color-border-divider});
1521
+ --ds-auro-calendar-month-header-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
1522
+ --ds-auro-calendar-cell-border-color: transparent;
1523
+ --ds-auro-calendar-cell-container-color: transparent;
1524
+ --ds-auro-calendar-cell-in-range-color: var(--ds-advanced-color-shared-background-muted, #{v.$ds-advanced-color-shared-background-muted});
1525
+ --ds-auro-calendar-cell-price-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
1526
+ --ds-auro-calendar-cell-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
1527
+ }
1528
+ ```
1529
+ <!-- AURO-GENERATED-CONTENT:END -->