DateRangePicker
ui.widgets.DateRangePickerElige una fecha de inicio y una de fin.
BEHAVIOR CONTRACT
El orden del rango, ambas entradas, el resaltado del calendario y la vida del overlay los coordina un único componente.
RECORDED INTERACTION
El harness pulsa “Start date” y se abre el calendario de rango.
// ── DateRangePicker ──
pub fn buildDateRangePicker(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
const drp = try W.DateRangePicker(.{ .initial_year = 2026, .initial_month = 5 }).mount(scope, cx);
return drp.wrapper;
}El código literal de la story en el Storybook (zenit 5f9add5+wip 2026-09-30). W es ui.widgets; col / row / label son pequeños helpers de layout del Storybook.
DateRangePickerProps
ui.widgets.DateRangePickerfn DateRangePicker(props: DateRangePickerProps) DateRangePickerBuilderCampo
Tipo
Predeterminado
Descripción
placeholder_start[]const u8"Start date"—
placeholder_end[]const u8"End date"—
start_date?SimpleDatenull—
end_date?SimpleDatenull—
initial_yearu162025—
initial_monthu81—
widthf32320—
sizetheme.ControlSize.md控件尺寸(与 Button / Input / Select 同一 ControlSize,默认 md)
disabledboolfalse—
on_change?core.HandlerRefnull—
calendar_icon_asset?svg_assets.Assetnull—
prev_icon_asset?svg_assets.Assetnull—
next_icon_asset?svg_assets.Assetnull—
test_id?[]const u8null—
DateRangePickerResult
ui.widgets.DateRangePickerCampo
Tipo
Predeterminado
Descripción
wrapper*Node—
—
state*DateRangePickerState—
—