<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FullCalendar Example</title>
    <link href='https://cdn.jsdelivr.net/npm/fullcalendar@5.10.1/main.min.css' rel='stylesheet' />
    <script src='https://cdn.jsdelivr.net/npm/fullcalendar@5.10.1/main.min.js'></script>
    <script src='https://cdn.jsdelivr.net/npm/fullcalendar@5.10.1/locales-all.min.js'></script>

</head>

<body>
<div id="calendar"></div>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            var calendarEl = document.getElementById('calendar');

            var calendar = new FullCalendar.Calendar(calendarEl, {
                height: "auto",

                initialView: 'dayGridMonth',
                locale: 'id', // Mengatur lokal ke bahasa Indonesia
                events: '/test.json',
                dayCellDidMount: function(info) {
                    // Mengecek jika hari ini adalah hari Minggu (0 = Minggu)
                    if (info.date.getDay() === 0) {
                        info.el.style.backgroundColor = '#dc3545';
                        info.el.style.color = 'white'; // Mengatur warna teks menjadi putih

                    }
                }
            });

            calendar.render();
        });
    </script>


</body>

<script></script>
</html>