From 7917eb03bded130ad4ffaa6431993280a1f48df0 Mon Sep 17 00:00:00 2001 From: Rushikesh-Sonawane99 Date: Fri, 7 Jun 2024 11:17:11 +0530 Subject: [PATCH] Issue #000 chore: fixed build issue --- src/components/MonthCalender.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/MonthCalender.tsx b/src/components/MonthCalender.tsx index 0e6b777e..7a852785 100644 --- a/src/components/MonthCalender.tsx +++ b/src/components/MonthCalender.tsx @@ -196,7 +196,9 @@ const MonthCalender: React.FC = ({ } else { const formattedDate = formatDate(newDate as Date); setDate(newDate); - setSelectedDates([newDate, newDate]); + if (typeof newDate === 'object') { + setSelectedDates([newDate, newDate]); + } onDateChange(newDate as Date | Date[] | null); } };