._.
This commit is contained in:
parent
8665dd5576
commit
9614187cb7
@ -203,3 +203,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.calendar-weekend {
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user