Datetime Year Range
spectrumui/datetime-picker-year-rangeFreeComponent
component for the Datetime Year Range
Install it
npx shadcn@latest add https://ui.spectrumhq.in/r/datetime-picker-year-range.jsonSource
1"use client";2import React from "react";3import { DateTimePicker } from "@/components/ui/datetime-picker";4import { Label } from "@/components/ui/label";56const DatetimePickerYearRange = () => {7 const [date, setDate] = React.useState<Date | undefined>(undefined);89 return (10 <div className="flex flex-col gap-3 lg:flex-row">11 <div className="flex w-72 flex-col gap-2">12 <Label>± 3 Years</Label>13 <DateTimePicker yearRange={3} value={date} onChange={setDate} />14 </div>15 <div className="flex w-72 flex-col gap-2">16 <Label>± 10 Years</Label>17 <DateTimePicker yearRange={10} value={date} onChange={setDate} />18 </div>19 <div className="flex w-72 flex-col gap-2">20 <Label>± 30 Years</Label>21 <DateTimePicker yearRange={30} value={date} onChange={setDate} />22 </div>23 </div>24 );25};2627export default DatetimePickerYearRange;
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 |
