DateRangePicker
ui.widgets.DateRangePicker시작일과 종료일을 선택합니다.
BEHAVIOR CONTRACT
범위 순서, 두 입력의 상태, 캘린더 하이라이트, 오버레이 수명을 하나의 컴포넌트가 조율합니다.
RECORDED INTERACTION
harness가 “Start date”를 클릭하면 범위 캘린더가 열립니다.
// ── 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;
}Storybook에 있는 이 story의 원본 코드입니다(zenit 5f9add5+wip 2026-09-30). W는 ui.widgets이며, col / row / label은 Storybook 내부의 작은 레이아웃 헬퍼입니다.
DateRangePickerProps
ui.widgets.DateRangePickerfn DateRangePicker(props: DateRangePickerProps) DateRangePickerBuilder필드
타입
기본값
설명
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.DateRangePicker필드
타입
기본값
설명
wrapper*Node—
—
state*DateRangePickerState—
—