Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple selected dates in Safari #35

Open
maraerben opened this issue May 24, 2022 · 4 comments
Open

Multiple selected dates in Safari #35

maraerben opened this issue May 24, 2022 · 4 comments

Comments

@maraerben
Copy link

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

@akurfuerst
Copy link

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

@jsarro2200
Copy link

jsarro2200 commented Oct 14, 2022

I'm with the same problem

@Shoichii
Copy link

did you manage to solve the problem?

@ghost
Copy link

ghost commented Dec 19, 2023

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);

        }
    }
});```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants