diff --git a/src/components/time-picker.tsx b/src/components/time-picker.tsx new file mode 100644 index 0000000..22bdb65 --- /dev/null +++ b/src/components/time-picker.tsx @@ -0,0 +1,84 @@ +'use client'; + +import * as React from 'react'; +import { ChevronDownIcon } from 'lucide-react'; + +import { Button } from '@/components/ui/button'; +import { Calendar } from '@/components/custom-ui/calendar'; +import { Input } from '@/components/ui/input'; +import { Label } from '@/components/ui/label'; +import { + Popover, + PopoverContent, + PopoverTrigger, +} from '@/components/ui/popover'; + +export default function TimePicker({ + dateLabel = 'Date', + timeLabel = 'Time', +}: { + dateLabel?: string; + timeLabel?: string; +}) { + const [open, setOpen] = React.useState(false); + const [date, setDate] = React.useState(undefined); + + return ( +
+
+ + + + + + + { + setDate(date); + setOpen(false); + }} + modifiers={{ + today: new Date(), + }} + modifiersClassNames={{ + today: 'bg-secondary text-secondary-foreground rounded-full', + }} + classNames={{ + day: 'text-center hover:bg-gray-500 hover:rounded-md', + }} + weekStartsOn={1} // Set Monday as the first day of the week + /> + + +
+
+ + +
+
+ ); +}