Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/components/creation/calendar/calendar-body-day-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ export function CalendarBodyDayCell({
isCurrentMonth,
}: CalendarBodyDayCellProps) {
const isSelected = calendarDay.isSelected;
const today = new Date();
const isToday =
calendarDay.getDay() === today.getDate() &&
calendarDay.getMonth() === today.getMonth() &&
calendarDay.getYear() === today.getFullYear();

const dayClassName = cn(
"relative aspect-square h-10 w-10 flex-center rounded-xl text-2xl",
isSelected && "bg-primary text-gray-50",
isHighlighted && "bg-slate-base text-gray-dark",
isToday && !isSelected && "ring-2 ring-primary",
);

return (
Expand Down
Loading