'use client'; import { ChevronLeft, ChevronRight } from 'lucide-react'; import { addCalendarDays, compareLocalDayStart } from '@/lib/appointmentTime'; interface ScheduleDayPickerProps { value: Date; onChange: (day: Date) => void; /** Inclusive minimum calendar day (typically today at local midnight). */ minDate: Date; label?: string; } export function ScheduleDayPicker({ value, onChange, minDate, label = 'Schedule date' }: ScheduleDayPickerProps) { const canGoPrev = compareLocalDayStart(value, minDate) > 0; const labelText = value.toLocaleDateString(undefined, { weekday: 'short', month: 'short', day: 'numeric', year: 'numeric', }); return (
{label}