Skip to content

Commit

Permalink
Use startOf('day') for isSelected check
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuruuh committed Apr 2, 2024
1 parent 8ca7852 commit 6133b67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Day.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export const Day: FC<DayProps> = ({ children }) => {

const isToday = date.toString() === dayjs().startOf('day').toString();

const isSelected = date.toString() === selectedDate?.toString();
const isSelected =
date.toString() === selectedDate?.startOf('day').toString();

const belongsToSelectedMonth = date.month() === temporarySelectedDate.month();

Expand Down

0 comments on commit 6133b67

Please sign in to comment.