main ← ux-update-display-period-when-custom-date-range-in-dashboard
merged 02:26PM - 26 Dec 25 UTC
The period selector in the admin dashboard wasn't updating its display when a cu…stom date range was chosen via the gear icon. It would stay stuck on whatever period was previously selected (e.g., "Year") even though the data was actually being filtered by the custom dates.
This threads the startDate and endDate values from the dashboard controller through the component chain: dashboard-period-selector passes them to period-chooser, which exposes them via selectKit options, allowing the header to pass them to the periodTitle helper.
When a custom range is selected, the controller now sets the period to "custom", and the periodTitle helper formats this as "Custom" with the actual date range displayed below (e.g., "Dec 1, 2025 – Dec 24, 2025").
Selecting a preset period like "yearly" from the dropdown still works as expected and overrides the custom selection.
Ref - https://meta.discourse.org/t/391952
**BEFORE**
<img width="1499" height="1341" alt="2025-12-24 @ 14 54 53" src="https://github.com/user-attachments/assets/66865c0a-e7aa-4446-a8fa-f925d5efa899" />
**AFTER**
<img width="1499" height="1341" alt="2025-12-24 @ 14 52 28" src="https://github.com/user-attachments/assets/6238a508-17a3-42e4-be99-5550e68117b9" />