diff --git a/src/shared/ui/calendar/nice-calendar-month.tsx b/src/shared/ui/calendar/nice-calendar-month.tsx index 349f994..8bdfc64 100644 --- a/src/shared/ui/calendar/nice-calendar-month.tsx +++ b/src/shared/ui/calendar/nice-calendar-month.tsx @@ -55,6 +55,8 @@ const NiceCalendarMonth = ({ if (startDate.isValid()) { setValueMonth(startDate.toDate()); } + } else { + setValueMonth(undefined); } } else if(calendarType === CalendarType.End){ @@ -71,6 +73,8 @@ const NiceCalendarMonth = ({ if (endDate.isValid()) { setValueMonth(endDate.toDate()); } + } else { + setValueMonth(undefined); } } else if(calendarType === CalendarType.Single){ @@ -79,6 +83,8 @@ const NiceCalendarMonth = ({ if (singleDate.isValid()) { setValueMonth(singleDate.toDate()); } + } else { + setValueMonth(undefined); } } };