TimeWindowSelect

Molecule

A time window behind one button, the dashboard way: the button names the window and opens a panel with Realtime (last N sliding, or the current calendar period, optionally so far) and History (last N anchored when applied, a fixed range typed in the window's zone, or a past period). Aggregation, grouping interval with a bucket estimate, and time zone apply to both. Edits are a draft until Update. Same `TimeWindowValue` as TimeWindowPicker.

Default

Preview
{"mode":"relative","last":"24h","interval":"5m","aggregation":"avg"}
Code
<TimeWindowSelect value={win} onChange={setWin} />

History range in a chosen zone, no period options

Preview
{"mode":"absolute","from":"2026-10-16T05:00:00.000Z","to":"2026-10-16T17:00:00.000Z","timezone":"Europe/Istanbul","interval":"1h"}
Code
<TimeWindowSelect value={{ mode: 'absolute', from, to, timezone: 'Europe/Istanbul' }} onChange={setWin} calendarPeriods={[]} />
Sourcemodules/ui/TimeWindowSelect.tsx