Time Confirm

Time Confirm is a copy-paste React component that stops meeting booked 12 hours off before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/time-confirm
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 3 extra npm packages
  • A11y guidance in docs

StopsMeeting booked 12 hours off

Was this component page useful?

How do I install Time Confirm?

pnpm dlx shadcn@latest add @bollard/time-confirm

The files land in your project. They're yours to edit.

How do I use Time Confirm in React?

time-confirm-usage.tsx
import { TimeConfirm } from "@/components/ui/time-confirm"

<TimeConfirm label="Launch call" date="2026-10-13" timeZone="Asia/Kolkata" zones={zones} defaultValue="12" />

What input mistakes does Time Confirm catch?

  • Hours 1–12 typed without AM/PM
  • Noon and midnight, spelled out
  • Times skipped by a DST change, with a move to the first real time
  • Times repeated by a DST change, with a choice of which
  • Other zones' times, flagged when they fall on another day

What props does Time Confirm accept?

TimeConfirm props
PropTypeDefault
label

Visible label. The entry zone's city is added after it.

string"Time"
hint

Helper text shown under the field while it is empty.

string—
date* (required)

The calendar day this time is on, as YYYY-MM-DD. Needed for weekday and DST math.

string—
timeZone* (required)

IANA zone the time is entered in, e.g. "Asia/Kolkata".

string—
zones

Up to 3 more IANA zones to show the same moment in.

string[][]
assume24h

Treat bare hours like "9" as 24-hour time instead of asking AM or PM.

booleanfalse
value

Controlled text.

string—
defaultValue

Initial text when uncontrolled.

string""
onValueChange

Called with the field's text on every change.

(value: string) => void—
onTimeChange

Called with "HH:mm" and the UTC instant whenever the moment changes (also on mount and when `date` or `timeZone` change), or `null` while it's ambiguous.

(time: { time: string; instant: string } | null) => void—
pickMessage

Warning shown until AM or PM is picked.

string"Pick AM or PM so nobody shows up 12 hours off."
invalidMessage

Warning shown when the text isn't a time.

string"Try a time like 9:30 am, 21:30 or noon."
describe

Spells a time out, e.g. "9:00 PM, Tue night". Override to translate.

(hour: number, minute: number, weekday: string) => stringdescribeTime
skippedText

`{time}` is the typed time and `{saved}` the real one after the clocks jump.

string"{time} doesn't exist that day: the clocks spring forward…
repeatedText

`{time}` is the time that happens twice; `{which}` is `firstLabel` or `secondLabel`.

string"{time} happens twice that day as the clocks fall back. U…
firstLabel

Label of the first occurrence of a repeated time.

string"first"
secondLabel

Label of the second occurrence of a repeated time.

string"second"
useLabel

Label of the fix that switches to the other occurrence or the real time; `{time}` is filled in.

string"Use {time}"
nextDayLabel

Flag for a time on the next day in another zone.

string"next day"
previousDayLabel

Flag for a time on the previous day in another zone.

string"previous day"
meridiemQuestion

Accessible name of the AM/PM choice; `time` is like "7:30".

(time: string) => string(time) => `${time} in the morning or evening?`

* required. Also accepts the native props of <input> (className, aria-*, data-*…), passed through to it.

How is Time Confirm accessible?

  • Visible <label>; aria-invalid and hint via aria-describedby
  • AM/PM choice is a roving-tabindex radiogroup with arrow keys
  • Hint in a polite live region
  • Animations respect reduced motion

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Needs a date and IANA time zone for DST checks
  • Parses common English time formats only
  • assume24h changes how bare hours are read

What expensive mistakes does Time Confirm stop?

Meeting booked 12 hours off

Also known as

time picker · time input · am pm · meeting time · dst · time zone · booking · appointment

Field type

What dependencies does Time Confirm require?

Time Confirm facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameTime Confirm
Registry identifier@bollard/time-confirm
Install commandnpx shadcn@latest add @bollard/time-confirm
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencies@date-fns/tz, lucide-react, motion
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Time Confirm

How does Time Confirm protect destructive mutations?

Time Confirm prevents meeting booked 12 hours off. Enforces deliberate friction against Hours 1–12 typed without AM/PM, Noon and midnight, spelled out, Times skipped by a DST change, with a move to the first real time, Times repeated by a DST change, with a choice of which, Other zones' times, flagged when they fall on another day. Limitation: authorize time-confirm mutations on the server.

How do I install time-confirm with shadcn?

Run `npx shadcn@latest add @bollard/time-confirm`. Sources added: registry/default/time-confirm/time-confirm.tsx. Package requirements: @date-fns/tz, lucide-react, motion.

What props customize Time Confirm?

Time Confirm accepts `label`, `hint`, `date`, `timeZone`, `zones`. Configures time picker, time input, am pm behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of time-confirm?

Needs a date and IANA time zone for DST checks. Parses common English time formats only. assume24h changes how bare hours are read Server requirement: backend verification for time-confirm.

How does Time Confirm meet accessibility guidelines?

Visible <label>; aria-invalid and hint via aria-describedby. AM/PM choice is a roving-tabindex radiogroup with arrow keys. Hint in a polite live region. Animations respect reduced motion. Minimizes errors: am pm confusion, dst skipped time.

Which components pair with Time Confirm?