diff --git a/WEB/app/src/app/app.css b/WEB/app/src/app/app.css index 94723b5..f9d3c74 100644 --- a/WEB/app/src/app/app.css +++ b/WEB/app/src/app/app.css @@ -184,3 +184,9 @@ .calendar-day:hover { background-color: #cfcfcf; } +.current-day { + border: 1px solid #2f9836; + border-radius: 50%; + font-weight: bold; + color: black; +} diff --git a/WEB/app/src/app/components/сalendar.js b/WEB/app/src/app/components/сalendar.js index b12abea..a74cdb3 100644 --- a/WEB/app/src/app/components/сalendar.js +++ b/WEB/app/src/app/components/сalendar.js @@ -1,9 +1,10 @@ 'use client'; -import {useState} from "react"; +import { useState } from "react"; const Calendar = () => { const [currentDate, setCurrentDate] = useState(new Date()); + const today = new Date(); // Текущая дата (для сравнения) const year = currentDate.getFullYear(); const month = currentDate.getMonth(); @@ -16,8 +17,7 @@ const Calendar = () => { const daysInMonth = new Date(year, month + 1, 0).getDate(); // Количество дней в месяце const startOffset = firstDayOfMonth === 0 ? 6 : firstDayOfMonth - 1; - - const daysArray = Array.from({length: daysInMonth}, (_, i) => i + 1); + const daysArray = Array.from({ length: daysInMonth }, (_, i) => i + 1); return [...Array(startOffset).fill(null), ...daysArray]; }; @@ -28,7 +28,7 @@ const Calendar = () => {