(Object, Component<DateLength>). Defines either a Date Domain, i.e. a range between two given dates, or a Date Length (a span of time). Can be combined with a companion Component<Date> to define length from a given benchmark Date.
The Date Domain variant exists such that it can force a valid date range by being interlinked.
Note. ‘Returns:’ refers to what the Component value returns when exported to its .variable
binding.
<component_key>: (Object, Component<DateLength>)
- Inherits from Component.
- name: (String, Localisation) - Optional.
- placeholder: (Object, Date) - Optional. Either true or false. If defined, the button is seen as a toggle (see also
.toggle
). Undefined by default.
- years: (Number)
- months: (Number)
- days: (Number)
- hours: (Number)
- minutes: (Number)
- seconds: (Number)
- date_domain: (Object) - Optional. Whether the component is actually a domain between two Dates. Undefined by default.
- date_one: (Component<Date>) - Optional. Auto-generated by default if not provided.
- date_two: (Component<Date>) - Optional. Auto-generated by default if not provided.
- max: (Object, Date) - The maximum length of time between the two dates that is permitted.
- disable_years: (Boolean)
- disable_months: (Boolean)
- disable_days: (Boolean)
- disable_hours: (Boolean)
- disable_minutes: (Boolean)
- disable_seconds: (Boolean)
- multiline: (Boolean) - Optional. Whether hours/minutes/seconds should be placed on another line.
- Returns: (Array<Object, Date; Object, Date>/Object, Date) - Returns either two Date Objects if date_domain is defined, or a single Object, Date if simply a regular DateLength component.