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

Incorrect classes for prev/next days #48

Open
klunejko opened this issue Dec 2, 2024 · 0 comments
Open

Incorrect classes for prev/next days #48

klunejko opened this issue Dec 2, 2024 · 0 comments

Comments

@klunejko
Copy link

klunejko commented Dec 2, 2024

Days belonging to the previous or next month aren't being displayed correctly, as "text-gray-500" is added without removing "text-gray-900". So you end up with an overview where every single day is shown in the same color.

classList.add('prev', 'text-gray-500', 'dark:text-white');

For that view, this should do the trick:

if (current < this.first) {
    classList.add("prev", "text-gray-500", "dark:text-white");
    classList.remove("text-gray-900");
} else if (current > this.last) {
    classList.add("next", "text-gray-500", "dark:text-white");
    classList.remove("text-gray-900");
}

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

1 participant