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; z-index: 1001;
position: absolute; position: absolute;
border: 1px solid black; border: 1px solid black;
}
.calendar-weekend {
color: red !important;
} }

View File

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