DashboardDateRangePicker
Dashboard-friendly wrapper around the core `DateRangePicker` that speaks ` start, end ` epoch-millisecond timestamps instead of `Date` objects, so it drops s…
Dashboard-friendly wrapper around the core DateRangePicker that speaks { start, end } epoch-millisecond timestamps instead of Date objects, so it drops straight into useDashboardDateRange from @tetherto/mdk-react-adapter.
import { DashboardDateRangePicker } from "@tetherto/mdk-react-devkit";| Prop | Status | Type | Default | Description |
|---|---|---|---|---|
value | Required | DashboardDateRange | — | Current range as `{ start, end }` epoch-millisecond timestamps. |
onChange | Required | (next: DashboardDateRange) => void | — | Fires with the next `{ start, end }` window when the user applies a range. |
dateFormat | Optional | string | undefined | — | Display format. Defaults to `dd/MM/yyyy`. |
disabled | Optional | boolean | undefined | — | Disable the trigger. |
className | Optional | string | undefined | — | Optional class hook. |
Usage
Dashboard wrapper around the core DateRangePicker. It speaks
{ start, end } epoch-millisecond timestamps so it drops straight into
useDashboardDateRange from @tetherto/mdk-react-adapter without any
intermediate Date <-> number plumbing in the page.
Notes
- The wrapper ignores partial selections —
onChangeonly fires once the user has picked bothfromandtoand clicked Apply Range in the core picker. - The popover, presets, and styling all come from the core
DateRangePicker. This wrapper exists only to adapt the value shape.
Example
/** * Runnable example for DashboardDateRangePicker. * * Demonstrates the `{ start, end }` timestamp shape — the same shape * `useDashboardDateRange` exposes from `@tetherto/mdk-react-adapter`. */import { DashboardDateRangePicker } from '@tetherto/mdk-react-devkit'import { useState } from 'react'export const DashboardDateRangePickerExample = () => { const now = Date.now() const [range, setRange] = useState({ start: now - 24 * 60 * 60 * 1000, end: now, }) return <DashboardDateRangePicker value={range} onChange={setRange} />}AlarmsBellButton
Top-bar bell button with a three-line severity badge (critical / high / medium). Counts are caller-provided so the button stays domain-agnostic; pair with `u…
ExportButton
Split-button trigger for downloading the current dashboard state. The left half labels the action (`↓ Export`); the right half opens a dropdown with the avai…