fullcalendar date start error in google Chrome

Asked

Viewed 14 times

0

Since the day 26 seems to be a fault in the google Chrome schedule. I found this using whatsAppWeb: https://www.techtudo.com.br/noticias/2021/01/horario-do-google-chrome-errado-usuarios-relatam-problemas-no-navegador.ghtml I have an application that uses fullcalendar and when dragging events, these were being scheduled erroneously. I created the code below for testing and this proved that, using Chrome, the failure occurs. When I use Edge the failure does not occur. Has anyone experienced the same situation? Is it just a momentary bug? Is there any practical solution?

<!DOCTYPE html>
<html>

<head>
    <meta charset='utf-8' />
    <link href='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/4.2.0/core/main.min.css' rel='stylesheet' />
    <link href='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/4.2.0/daygrid/main.min.css' rel='stylesheet' />
    <script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/4.2.0/core/main.min.js'></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/4.2.0/interaction/main.min.js'></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/4.2.0/daygrid/main.min.js'></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/4.2.0/core/locales-all.min.js'></script>
    <script>

        document.addEventListener('DOMContentLoaded', function () {
            var calendarEl = document.getElementById('calendar');

            var calendar = new FullCalendar.Calendar(calendarEl, {

                locale: 'pt-br',
                plugins: ['interaction', 'dayGrid'],
                //defaultDate: '2019-04-12',
                editable: true,
                eventLimit: true,
                 
                events: [
                    {
                        title: 'event1',
                        start: '2021-02-05'
                    },
                    {
                        title: 'event2',
                        start: '2021-02-07',
                        end: '2010-02-08',
                        allDay: true
                    },
                    {
                        title: 'event3',
                        start: '2021-02-10T12:30:00',
                        allDay: false // will make the time show
                    }
                ],
                extraParams: function () {
                    return {
                        cachebuster: new Date().valueOf()
                    };
                },


                eventDrop: function (info) {
                    alert(info.event.start.toISOString());
                    alert(info.event.end.toISOString());
                },
            });

            calendar.render();
        });

    </script>
    <style>
        body {
            margin: 40px 10px;
            padding: 0;
            font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
            font-size: 14px;
        }

        #calendar {
            max-width: 900px;
            margin: 0 auto;
        }
    </style>
</head>

<body>

    <div id='calendar'></div>

</body>

</html>

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.