Primitives
Time and date-time pickers
Values stay plain strings: “14:30”, “2026-10-10T14:30”.
time-picker.tsx
"use client";
import { DateTimePicker, Label, TimePicker } from "@waveinno/ui";
import * as React from "react";
export default function TimeDemo() {
const [t24, setT24] = React.useState("14:30");
const [t12, setT12] = React.useState("");
const [dt, setDt] = React.useState("");
return (
<div className="grid max-w-2xl gap-4 sm:grid-cols-3">
<div className="space-y-1.5">
<Label>Opens at (24h)</Label>
<TimePicker value={t24} onChange={setT24} />
</div>
<div className="space-y-1.5">
<Label>Closes at (12h, 15 min)</Label>
<TimePicker value={t12} onChange={setT12} hourCycle={12} step={15} />
</div>
<div className="space-y-1.5">
<Label>Publish at</Label>
<DateTimePicker value={dt} onChange={setDt} />
</div>
</div>
);
}Import#
Everything comes from the package root. The example above uses:
your-component.tsx
import { DateTimePicker, Label, TimePicker } from "@waveinno/ui";Props#
Read from the source of this version, so they match the code exactly.
<TimePicker>
src/components/ui/time-picker.tsx| Prop | Type | Default | Description |
|---|---|---|---|
valuerequired | string | — | "HH:mm" (24-hour) or "". |
onChangerequired | (value: string) => void | — | |
id | string | — | |
placeholder | string | "Pick a time" | |
step | number | 5 | |
hourCycle | 12 | 24 | 24 | |
min | string | — | |
max | string | — | |
locale | string | "en-GB" | |
disabled | boolean | — | |
clearable | boolean | true | |
className | string | — | |
labels | { now?: string; done?: string; clear?: string } | — |
<DateTimePicker>
src/components/ui/date-picker.tsx| Prop | Type | Default | Description |
|---|---|---|---|
id | string | — | |
placeholder | string | "Pick a date and time" | |
disabled | boolean | — | |
clearable | boolean | true | |
className | string | — | |
locale | string | "en-GB" | Month and weekday names and digits, e.g. "bn-BD". |
weekStartsOn | Weekday | 1 | 0 = Sunday … 6 = Saturday. |
valuerequired | string | — | "2026-10-10T14:30" (local wall time) or "". |
onChangerequired | (value: string) => void | — | |
min | string | — | Earliest / latest, "YYYY-MM-DDTHH:mm". |
max | string | — | |
step | number | 5 | |
hourCycle | 12 | 24 | 24 | |
defaultTime | string | "09:00" | Time used when a day is picked before any time. |
labels | { now?: string; done?: string; clear?: string; time?: string } | — |
<Label>
src/components/ui/label.tsx| Prop | Type | Default | Description |
|---|---|---|---|
required | boolean | — |
Also takes ComponentPropsWithoutRef<typeof LabelPrimitive.Root>.
Install#
If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.
$ npm install @waveinno/ui