<DateInput>
Displays input for entering a date.
Note that this is not a calendar-style UI.
Use of <DateInput>
<DateInputid="myDateInput"name="birthday"isRequiredlabelHtml={{ en: 'What is your birthday?' }}hintHtml={{ en: 'E.g. user@example.com' }}showDate={true}showTime={false}showSecond={false}/>
<DateInput>
's props
Prop | About | Type |
---|---|---|
dayLabelHtml | Localisable HTML: day label content. | LocalisedHtml |
dayPlaceholder | Localisable PlainText: day input placeholder. Placeholder content may cause accessibility problems as users can confuse it with their own form values.
With | LocalisedPlainText |
hideInAnswerSummary | Whether to hide any answers below this. | boolean |
hintHtml | Localisable HTML: hint content. | LocalisedHtml |
hourLabelHtml | Localisable HTML: hours label content. | LocalisedHtml |
hourPlaceholder | Localisable PlainText: hour input placeholder. Placeholder content may cause accessibility problems as users can confuse it with their own form values.
With | LocalisedPlainText |
isRequired | Whether users are required to fill in this form field. This setting affects | boolean |
labelHelpPopoutContentButtonLabel | Localisable text: Popout Content button label | LocalisedPlainText |
labelHelpPopoutContentModalContentHtml | Localisable text: Popout Content modal title | LocalisedHtml |
labelHelpPopoutContentModalHeadingHtml | Localisable text: Popout Content modal title | LocalisedHtml |
labelHtml | Localisable HTML: label content. Used as However is named 'labelHtml' for consistency with other form field components. | LocalisedHtml |
maxDateUTC | Maximum valid date in UTC. Value is a string formated as:
E.g.
| string | false |
minDateUTC | Minimum valid date in UTC. Value is a string formated as:
E.g.
| string | false |
minuteLabelHtml | Localisable HTML: minutes label content. | LocalisedHtml |
minutePlaceholder | Localisable PlainText: minute input placeholder. Placeholder content may cause accessibility problems as users can confuse it with their own form values.
With | LocalisedPlainText |
monthLabelHtml | Localisable HTML: month label content | LocalisedHtml |
monthPlaceholder | Localisable PlainText: month input placeholder. Placeholder content may cause accessibility problems as users can confuse it with their own form values.
With | LocalisedPlainText |
name | The Name of the form control. Submitted with the form as part of a name:value pair in the | string |
secondLabelHtml | Localisable HTML: seconds label content. | LocalisedHtml |
secondPlaceholder | Localisable PlainText: seconds input placeholder. Placeholder content may cause accessibility problems as users can confuse it with their own form values.
With | LocalisedPlainText |
showDate | Whether to display the year/month/day input fields. | boolean |
showSecond | Whether to display the seconds input field. | boolean |
showTime | Whether to display the hour/minute input fields. | boolean |
validationErrorInvalidHtml | Localisable HTML: invalid validation content | LocalisedHtml |
validationErrorRequiredHtml | Localisable HTML: required validation content | LocalisedHtml |
yearLabelHtml | Localisable HTML: year label content. | LocalisedHtml |
yearPlaceholder | Localisable PlainText: year placeholder content. Placeholder content may cause accessibility problems as users can confuse it with their own form values.
With | LocalisedPlainText |
id | Component Id. Must be unique within the form. | string |
meta | Arbitrary metadata on this node. This is useful when developing custom controls as it allows you to pass down metadata/extensions. | string |
hasChildrenById | Non-editable. Used to indicate that this component doesn't have children. | false |
hasTagsById | Non-editable. Used to indicate that this component isn't a form field with tags by id. | false |
isFormField | Non-editable. Used to indicate that this component is a form field. | true |
isMultichoice | Non-editable. Used to indicate that this component isn't a multichoice form field like | false |
type | Non-editable. Type of component of | "DateInput" |