Calendar
ui.widgets.CalendarMonth-view date browsing and selection.
BEHAVIOR CONTRACT
Month math, first-week offset, selection and navigation share the SimpleDate model.
RECORDED INTERACTION
The harness clicks the 18th and the selection moves.
// ── Calendar ──
pub fn buildCalendar(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
const cal = try W.Calendar(.{ .initial_year = 2026, .initial_month = 5 }).mount(scope, cx);
return cal.wrapper;
}The story's verbatim source from the Storybook (zenit 4c50245 2026-10-01). W is ui.widgets; col / row / label are small Storybook layout helpers.
CalendarProps
ui.widgets.Calendarfn Calendar(props: CalendarProps) CalendarBuilderField
Type
Default
Description
initial_yearu162025—
initial_monthu81—
selected_date?SimpleDatenull—
on_select?core.HandlerRefnull—
cell_sizef3236—
prev_icon_asset?svg_assets.Assetnull—
next_icon_asset?svg_assets.Assetnull—
CalendarResult
ui.widgets.CalendarField
Type
Default
Description
wrapper*Node—
—
state*CalendarState—
—