Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA two-segment month and two-digit year field for payment cards that rejects expired cards, accepts the current month and reports YYYY-MM. Use this when a payment form asks for the expiry printed on a card as MM/YY.
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 a payment form asks for the expiry printed on a card as MM/YY.
Do not use it for general month and year choices; use month-picker.
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 |
|---|---|---|---|
| value / defaultValue / onValueChange | string | null | null | Expiry as YYYY-MM. |
| today | string | today | Reference day. |
| maxYears | number | 20 | Furthest expiry accepted. |
| name | string | - | Hidden input (YYYY-MM). |
The pattern ships with a Testing Library test (card-expiry-field.test.tsx) that covers typing MM/YY, expired cards, the current month and the far future.