Docs
Date Time Field

Date Time Field

Date Time Field allows user to enter date and time value.

Installation

npx shadcn@latest add https://ui-x.junwen-k.dev/r/date-time-field.json

Usage

import {
  DateTimeField,
  DateTimeFieldAmPm,
  DateTimeFieldDays,
  DateTimeFieldHours,
  DateTimeFieldMinutes,
  DateTimeFieldMonths,
  DateTimeFieldSeconds,
  DateTimeFieldSeparator,
  DateTimeFieldYears,
} from "@/components/ui/date-time-field"
<DateTimeField>
  <DateTimeFieldDays />
  <DateTimeFieldSeparator>/</DateTimeFieldSeparator>
  <DateTimeFieldMonths />
  <DateTimeFieldSeparator>/</DateTimeFieldSeparator>
  <DateTimeFieldYears />
  <DateTimeFieldSeparator>·</DateTimeFieldSeparator>
  <DateTimeFieldHours />
  <DateTimeFieldSeparator>:</DateTimeFieldSeparator>
  <DateTimeFieldMinutes />
  <DateTimeFieldSeparator>:</DateTimeFieldSeparator>
  <DateTimeFieldSeconds />
  <DateTimeFieldAmPm />
</DateTimeField>

Examples

Default

Form

Schedule your event by selecting a date and time.