color-calendar icon indicating copy to clipboard operation
color-calendar copied to clipboard

Multiple selected dates in Safari

Open maraerben opened this issue 2 years ago • 4 comments

In Safari (15.5 (17613.2.7.1.8)) there are always two selected dates shown. In Google Crome it works well. Snímek obrazovky 2022-05-24 v 9 33 11

maraerben avatar May 24 '22 07:05 maraerben

is there any solution? I have, this issue, too. The problem is, that the current day is selected at first, but when I click on another day then today doesn't loose the selected class

akurfuerst avatar Oct 14 '22 14:10 akurfuerst

I'm with the same problem

jsarro2200 avatar Oct 14 '22 16:10 jsarro2200

did you manage to solve the problem?

Shoichii avatar Dec 19 '23 15:12 Shoichii

Long time ago... I have "fixed" that with a timeout. Not cool, but works

Maybe it helps:


let calendar = new Calendar({
     // ...
    dateChanged: (currentDate, filteredDateEvents) => {

        if (filteredDateEvents.length) {

            // ...

            // safari fix
            setTimeout(() => {
                const $activeItems = document.querySelectorAll('.calendar__day-selected');
                if ($activeItems.length > 1) {
                    $activeItems[0].classList.remove('calendar__day-selected');
                }
            }, 100);

        }
    }
});```

forte-tech-de avatar Dec 19 '23 15:12 forte-tech-de