This commit is contained in:
Андрей Дувакин 2025-01-28 19:27:14 +05:00
parent 8665dd5576
commit 9614187cb7
2 changed files with 7 additions and 1 deletions

View File

@ -202,4 +202,8 @@
z-index: 1001;
position: absolute;
border: 1px solid black;
}
.calendar-weekend {
color: red !important;
}

View File

@ -94,10 +94,12 @@ const Calendar = () => {
const eventCount = dayEvents.length;
const backgroundColor = eventCount > 0 ? getEventColor(eventCount) : "transparent";
const weekendClass = [5, 6].includes(index % 7) ? "calendar-weekend" : "";
return (
<div
key={index}
className={`calendar-day ${
className={`calendar-day ${weekendClass} ${
today.getFullYear() === year &&
today.getMonth() === month &&
today.getDate() === day