Datetime Picker and Time Input
spectrumui/datetime-picker-and-time-inputFreeComponent
component for the Datetime Picker and Time Input
Install it
npx shadcn@latest add https://ui.spectrumhq.in/r/datetime-picker-and-time-input.jsonSource
1"use client";2import React, { useState } from "react";3import { DateTimePicker, TimePicker } from "@/components/ui/datetime-picker";45const DatePickerAndTimeInput = () => {6 const [date, setDate] = useState<Date | undefined>(undefined);7 const [time, setTime] = useState<Date | undefined>(undefined);89 return (10 <div className="flex flex-col gap-3 md:flex-row md:gap-10">11 <div className="w-72 space-y-2">12 <p>Date Picker</p>13 <DateTimePicker14 granularity="day"15 value={date}16 onChange={setDate}17 locale={undefined}18 weekStartsOn={undefined}19 showWeekNumber={undefined}20 showOutsideDays={undefined}21 />22 </div>23 <div className="w-72 space-y-2">24 <p>Time Input</p>25 <TimePicker date={time} onChange={setTime} />26 </div>27 </div>28 );29};3031export default DatePickerAndTimeInput;
What it pulls in
Other registry items
Files it writes
More from spectrumui
All 182 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | spectrumui | Components | Free | no deps | |
| Alert demoalert-1 | spectrumui | Components | Free | 1 dep | |
| Alert 2alert-2 | spectrumui | Components | Free | no deps | |
| Alert 3alert-3 | spectrumui | Components | Free | 1 dep | |
| Alert 4alert-4 | spectrumui | Components | Free | 1 dep | |
| Animated Cardanimated-card | spectrumui | Components | Free | 1 dep · 2 files | |
| Animated Draweranimated-drawer | spectrumui | Components | Free | 4 deps | |
| Animated SVG Chartanimated-SVG-chart | spectrumui | Components | Free | 1 dep |
