HOF-Component-Date
A component for handling the rendering and processing of 3-input date fields used in HOF Applications.
Usage
In your fields config:
const dateComponent = ; moduleexports = 'date-field':
The above example will create a new date component with the key 'date-field'
and will apply the validators required
and before
(before today).
Configuration
The following optional configuration options are supported:
validate {String|Array}
- validators to use on the processed date fieldtemplate
- an absolute path to an alternate template.dayOptional {Boolean}
- day defaults to01
if omitted. Defaults tofalse
monthOptional {Boolean}
- month defaults to01
if omitted. If true then also forcesdayOptional
to be true. Defaults tofalse
Labels
The three intermedate fields have fallback labels of Day, Month and Year, however custom labels can be used by including the translation at the following path:
fields.json