Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA start and end date-time for a promotion that must be in order, in the future and not overlap a sale already planned for the same product. Use this when promotions are scheduled ahead and two sales on the same item must not run at once.
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 promotions are scheduled ahead and two sales on the same item must not run at once.
Do not use it for a single moment; use date-time-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 |
|---|---|---|---|
| existing | { name: string; start: string; end: string }[] | [] | Sales already planned. |
| now | string | clock | Local date-time; the sale must start after it. |
| onValueChange | (window: { start; end } | null) => void | - | A valid window, else null. |
The pattern ships with a Testing Library test (sale-window-datetime.test.tsx) that covers ordering, the past, overlaps (including touching ends) and the callback.