Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Change the background color of previous month's events in Calendar
Hi,
I'm currently developing a Calendar, and I've implemented a function to switch month.
The default month view starts with the first month day and goes all the way to the last, but Vaadin still shows me some previous month's days and next month's days to fill all the space available.
Is it possible to style only those days to a different background color, so the user instantly knows that they belong to the past or future month?
Hi,
the days in the past month have the CSS class "v-calendar-month-day v-calendar-month-day-prev-month" and the days in the future month have the class "v-calendar-month-day v-calendar-month-day-next-month", you should be able to use those to style the day cells with something like background-color: #cccccc.
Hope this helps,
Olli
Thank you so much, I should've seen it myself!
By the way, I went with ".v-calendar-month-day-prev-month" and ".v-calendar-month-day-next-month"