diff --git a/src/components/common/DatePicker.tsx b/src/components/common/DatePicker.tsx index ad16e57..271175b 100644 --- a/src/components/common/DatePicker.tsx +++ b/src/components/common/DatePicker.tsx @@ -28,16 +28,24 @@ interface DatePickerProps { } const OneDatePick: React.FC = ({ date, setDate, style }) => { + const [startDate, setStartDate] = useState(new Date()); + const handleDateChange = (date: Date | null) => { if (date) { + setStartDate(date); setDate(date); + } else { } }; + useEffect(() => { + setStartDate(date); + }, [date]); + return (