Docs
Date Time Field Primitive
Date Time Field Primitive
Date Time Field Primitive allows user to enter date and time value.
About
The <DateTimeFieldPrimitive />
component is built on top of timescape, wrapping the library to deliver a more consistent API that aligns with Radix UI conventions.
Installation
npx shadcn@latest add https://ui-x.junwen-k.dev/r/date-time-field-primitive.json
Anatomy
Import all parts and piece them together.
import * as DateTimeFieldPrimitive from "@/components/ui/date-time-field-primitive"
export default () => (
<DateTimeFieldPrimitive.Root>
<DateTimeFieldPrimitive.Days />
<DateTimeFieldPrimitive.Separator />
<DateTimeFieldPrimitive.Months />
<DateTimeFieldPrimitive.Separator />
<DateTimeFieldPrimitive.Years />
<DateTimeFieldPrimitive.Separator />
<DateTimeFieldPrimitive.Hours />
<DateTimeFieldPrimitive.Separator />
<DateTimeFieldPrimitive.Minutes />
<DateTimeFieldPrimitive.Separator />
<DateTimeFieldPrimitive.Seconds />
<DateTimeFieldPrimitive.Separator />
<DateTimeFieldPrimitive.AmPm />
</DateTimeFieldPrimitive.Root>
)