Skip to content

Commit

Permalink
Issue #000 chore: fixed build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushikesh-Sonawane99 committed Jun 7, 2024
1 parent 7531207 commit 7917eb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/MonthCalender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ const MonthCalender: React.FC<CalendarWithAttendanceProps> = ({
} 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);
}
};
Expand Down

0 comments on commit 7917eb0

Please sign in to comment.