Date time pickerforms
Date and time fields composed into one value, either a { date, time } pair or an instant resolved in the provider time zone.
설치
pnpm
pnpm dlx shadcn@4.23.0 add @uikit/date-time-pickerDefault
date-time-picker-demo.tsx
"use client";
import * as React from "react";import { DateTimePicker, type DateTimeValue } from "@/components/ui/date-time-picker";
export default function DateTimePickerDemo() { const [value, setValue] = React.useState<DateTimeValue | null>(null); return ( <div className="flex flex-col gap-2"> <DateTimePicker aria-label="Arrival" name="arrival" value={value} onValueChange={setValue} step={15} /> <p className="text-sm text-muted-foreground">{value ? `${value.date} ${value.time}` : "No date and time selected"}</p> </div> );}