Skip to content

Commit

Permalink
Merge pull request #262 from Rushikesh-Sonawane99/shiksha-2.0
Browse files Browse the repository at this point in the history
Issue #000 chore: fixed build issue
  • Loading branch information
itsvick authored Jun 7, 2024
2 parents 7531207 + 7917eb0 commit aa2867a
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 aa2867a

Please sign in to comment.