ui:DatePicker
Shared, editable XML components from the date-picker family.
Usage
Declare the catalog namespace in your screen and run relo-components build to bundle its dependencies before delivery. Install Components host support before session creation. Use ui:Theme or your compatible theme.
<ui:Theme xmlns:ui="urn:relo:registry:relo">
<ui:DatePicker bind-page="data.page" />
</ui:Theme>
Supply the required data fields with the shape expected by the component. This invocation shows the input boundary; see the editable definition for composition and service requirements.
Dependencies: button, calendar, popover, theme.
Exports
ui:DatePicker
| Prop | Default | Required |
|---|---|---|
page | — | Yes |
value | null | No |
label | 'Pick a date' | No |
mode | 'single' | No |
Template signatures declare names and defaults, not static types. Values must satisfy the underlying primitive or service. Defaults preserve the exact source expression; the definition below shows how inputs are used. Use literal strings or bind-* for evaluated values. Unknown inputs and missing required props fail validation.
Events
on-change— explicitly emitted output; inspect the definition for payload shape.
Slots
No content outlets.
Definition and forwarded payloads
<Component name="DatePicker" props="page, value=null, label='Pick a date', mode='single'" xmlns:ui="urn:relo:registry:relo">
<Column state="{open:false}">
<ui:Button ref="trigger" bind-label="props.label" variant="outline" on-press="set open to true">
<ui:IconCalendar class="w-4 h-4" />
<Text bind-text="props.label" class="font-rc-small" />
</ui:Button>
<ui:Popover model="open" anchor="trigger" title="Choose date">
<ui:Calendar bind-value="props.value" bind-page="props.page" bind-mode="props.mode" on-change="emit change with event; if props.mode != 'range' or event.value['end'] != null then set open to false end" />
</ui:Popover>
</Column>
</Component>
Composition and accessibility
Use explicit value/change ownership; events do not bubble automatically. A component forwards only outputs declared by its own emits. Slots retain caller scope. Supply meaningful labels for interactive controls, preserve focus and touch targets, and test reduced motion on each platform.
Component customization · Definitions and slots · Components index