DateRange
A start/end date control with presets (last_7_days, this_month, custom, …).
It writes two URL params — start_param / end_param (default name_start /
name_end) — that your SQL reads.
SELECT date, visits
FROM daily
WHERE ('${from}' = '' OR date >= '${from}')
AND ('${to}' = '' OR date <= '${to}')
ORDER BY date
default= seeds a preset on first load (URL params still win):
| Attribute | Purpose |
|---|---|
name |
Required. Base filter key. |
start_param / end_param |
URL/SQL param names (default name_start / name_end). |
presets |
Comma-separated preset list, in display order. |
default |
A preset applied on first load. |
persist |
Remember the selection in localStorage across pages. |
bar |
Lift into the top filter bar (default: inline). |
The project-wide global date filter is this same control configured
once in dashdown.yaml. Filter controls are stripped from static builds.