Month Year Field
Two inputs (month, year) for collecting partial dates.
Preview
JSON definition
{ "type": "MonthYearField", "name": "fieldName", "title": "Question title", "hint": "", "shortDescription": "", "options": {}}Properties
| Property | Type | Required | Description |
|---|---|---|---|
hint | string | No | Hint text displayed below the field label to help the user answer the question. |
shortDescription | string | No | A short description of the field used in the check-your-answers summary. |
Options
| Property | Type | Required | Description |
|---|---|---|---|
classes | string | No | Additional CSS classes applied to the component. |
customValidationMessage | string | No | A single custom message shown for any validation error on this field. |
customValidationMessages | object | No | A map of Joi error codes to custom error messages. |
instructionText | string | No | Alternative text read by screen readers in place of the field title. |
maxDaysInFuture | number | No | Maximum number of days in the future the entered date can be. |
maxDaysInPast | number | No | Maximum number of days in the past the entered date can be. |
optionalText | boolean | No | When true, appends '(optional)' to the field label. |
required | boolean | No | Whether the field must be filled in. Defaults to true. |