Time Field

A time field allows users to enter and edit time values using a keyboard.

––––AM
<TimeField aria-label="Event time">
  <DateInput />
</TimeField>

Installation

npx shadcn@latest add @dotui/time-field

Usage

Use TimeField to allow users to enter and edit time values using a keyboard.

import { TimeField } from "@/components/ui/time-field";
import { DateInput } from "@/components/ui/input";
import { Label } from "@/components/ui/field";
<TimeField>
  <Label>Time</Label>
  <DateInput />
</TimeField>

Playground

Use the controls below to experiment with different time field props and see the live preview and code update.

Time
––––AM
<TimeField>
  <Label>Time</Label>
  <DateInput />
</TimeField>

API Reference

A time field allows users to enter and edit time values using a keyboard. Each part of a time value is displayed in an individually editable segment.

PropType
boolean
boolean
T
12 | 24
"hour" | "minute" | "second"
boolean
boolean
ReactNode | function
T | null
T | null
function

Last updated on 1/13/2026

Built with passion by @mehdibha.