Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA day, week, month, quarter or year switch that swaps in the matching picker and always reports the same shape: a first day, a last day and a label. Use this when a report can be read by different time units and the filter should change with the unit.
This item has no props to tune. Use the lens above to change theme, density, direction and more.
Use it when a report can be read by different time units and the filter should change with the unit.
Do not use it when the unit is fixed; use the picker for that unit directly.
This item is part of tealmac UI Pro
The source for this item installs with a Pro licence key. Log in with your key to see the install command, or read the Pro setup page.
| Prop | Type | Default | Description |
|---|---|---|---|
| defaultUnit | day | week | month | quarter | year | month | Starting unit. |
| onValueChange | (period: { unit; from; to; label }) => void | - | Called when a period is chosen. |
| today / locale | - | - | Reference day and locale. |
The pattern ships with a Testing Library test (report-period-switcher.test.tsx) that covers the range of each unit and switching units.