Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA typed date range that snaps both ends to whole weeks, months or quarters as soon as they are entered, and says what the range became. Use this when reports only make sense for complete periods and people type any day.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
Use it when reports only make sense for complete periods and people type any day.
Do not use it when arbitrary day ranges are valid; use date-range-field.
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 |
|---|---|---|---|
| unit | week | month | quarter | month | The period to snap to (controlled by the toggle too). |
| onValueChange | (range: DateRange | null, original: DateRange | null) => void | - | The snapped range and what was typed. |
| firstDay | number | 1 | First weekday for week snapping. |
The pattern ships with a Testing Library test (snap-range-to-period.test.tsx) that covers snapping for each unit and the message.