name: DatePicker
purpose: Native date input. In AutoForm, rangeEnd edits a second field as one date range.
attributes:
range: boolean; show a standalone end-date input
rangeend: string; second AutoForm data field; schema setting.rangeEnd takes precedence
properties:
value: string; start date, YYYY-MM-DD
state:
start: string; start date, YYYY-MM-DD
end: string; end date, YYYY-MM-DD when range is enabled
events:
change: detail is the changed date string
examples:
single_and_range: |
rules:
- Define page data before DatePicker is parsed.
- Use range for a standalone visual range; read its state.start and state.end.
- In AutoForm, declare setting.rangeEnd on the start field; the end field does not need its own schema item.
related:
- ../base/AutoForm.yaml
tests:
- DatePicker.test.html