Date
Generates a text input field which will show a date picker when focused.
For common form layout options, check the form styleguide
Example usage
{{
form.date({
'label': 'Date picker',
'id': 'foo'
})
}}
See the Pen docs - form - date by Pulsar (@pulsar) on CodePen.
Options applied to parent wrapper
| Option | Type | Description |
|---|---|---|
| class | string | A space separated list of class names |
| guidance | string | Text to be displayed in a popover, adds a (?) icon after the input |
| guidance-container | string | Element to bind guidance popover scroll behaviour to (default body) |
| help | string | Additional guidance information to be displayed next to the input |
| label | string | Text for the <label> companion element |
| required | bool | Visually indicates that the field must be completed |
Options applied to input
| Option | Type | Description |
|---|---|---|
| autofocus | bool | Whether the field should have input focus on page load |
| disabled | bool | Stops the element from being interactive if true |
| form | string | Specific one or more forms this label belongs to |
| id | string | A unique identifier, if required |
| name | string | The name of this control |
| placeholder | string | A short hint that describes the expected value |
| required | bool | Adds required and aria-required="true" attributes |
| value | string | Specifies the value of the input |
| data-* | string | Data attributes, eg: 'data-foo': 'bar' |
Any other options not listed here will be applied to the input.