Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA day range that also shows the same dates a year earlier, moving 29 February to 28 February in non-leap years and flagging the day count mismatch. Use this when figures are read against the same dates last year and leap years must not skew the comparison.
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 figures are read against the same dates last year and leap years must not skew the comparison.
Do not use it for the previous period of equal length; use compare-to-previous-period.
It composes date-range-field and date-time-core, which the CLI installs for you.
import { YearOverYearRange } from "@/components/year-over-year-range"<YearOverYearRange onValueChange={(range, lastYear) => load(range, lastYear)} />| Prop | Type | Default | Description |
|---|---|---|---|
| value / defaultValue | { from: string; to: string } | null | null | The current range. |
| onValueChange | (range, lastYear: DateRange | null) => void | - | Both ranges. |
| max | string | - | Latest selectable day. |
The pattern ships with a Testing Library test (year-over-year-range.test.tsx) that covers ordinary ranges, a leap day, and the day count note.