Skip to content

Incorrect classes for prev/next days #48

@klunejko

Description

@klunejko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions