Memorable date
A memorable date is one I can easily recall without having to pick it in a calendar.
The Memorable date component is used to allow the user to enter a date in an online form they are very familiar with, such as their birthday.
Details
- Extends: USWDS Memorable date component
- Customization: Styles
- Modifier:
.cfa-memorable-date
,.cfa-legend
,.cfa-label
,.cfa-hint
,.cfa-select
,.cfa-input
The Memorable date extends the USWDS Memorable date component. Further customization is applied using the CSS modifier(s) .cfa-memorable-date
, .cfa-legend
, .cfa-label
, .cfa-hint
, .cfa-select
, .cfa-input
to add styles defined in a custom stylesheet.
Modifier. A modifier is a class name that applies a variant, type, or extended style customization to modify the component's visual appearance.
Examples
Guidance
Age. If you are looking to evaluate age consider asking for their age using a Form group with text input component instead of date of birth using the memorable date component.
Month. A text input component as opposed to a select component for the month is supported.
Fieldsets vs. form groups. Form questions with multiple inputs including checkbox, button, and memorable date components always use the fieldset component to group available options and a nested legend
element. Other form element components with singular text inputs, text areas, and selects, will use the form group component.
Fieldset. Refer to fieldset documentation.
Form group. Refer to form group documentation.
Select. Refer to select documentation.
Text input. Refer to text input documentation.
Refer to additional guidance on the USWDS documentation site.
USWDS documentation siteAdditional references
Accessibility
Refer to additional accessibility guidance on the USWDS documentation site.
Checklist Key
Design library component
Source and usage
- Sass stylesheet:
./_cfa-memorable-date.scss
- Thymeleaf template fragment:
./cfa-memorable-date.th.html
- Embedded Ruby (ERB) partial template:
./_cfa-memorable-date.html.erb