import { format } from 'date-fns'; import { CalendarIcon } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Calendar } from '@/components/ui/calendar'; import { Popover, PopoverContent, PopoverTrigger, } from '@/components/ui/popover'; import { cn } from '@/lib/utils'; type DatePickerProps = { value?: Date | null; onChange?: (date: Date | undefined) => void; placeholder?: string; className?: string; disabled?: boolean; maxDate?: Date; }; const defaultMaxDate = new Date( new Date().setFullYear(new Date().getFullYear() + 5), ); export function DatePicker({ value, onChange, placeholder = 'Pilih tanggal', className, disabled, maxDate = defaultMaxDate, }: DatePickerProps) { return ( ); }