Directory

← Back

StyleCalendar

A simple calendar component.

Author

Rating

Popularity

<100

StyleCalendars goal is to offer a simple, extendable calendar component with an easily themeable client-side DOM structure.

Its features include:

  • setting stylenames for individual days
  • disabling date ranges and individual days
  • customizable header and week numbers
  • tooltip support

Also includes a StyleCalendarField component which is a simple textfield that uses StyleCalendar as a popup for date selection. This feature is experimental.

Sample code

Java:

StyleCalendar sc = new StyleCalendar();

sc.setDateStyleGenerator(new StyleCalendar.DateStyleGenerator()

           @Override
            public String getStyleName(Date date, StyleCalendar context) {
                Date now = new Date();

                if (date.after(now)) {
                    return "future";
                } else if (date.before(now)) {
                    return "past";
                } else {
                    return null;
                }
            }
});

CSS:

.v-stylecalendar .future {
	background-color: red;
}

.v-stylecalendar .past {
	background-color: blue;
}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2010-01-22
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.2+
Vaadin 6.7+ in 0.6
Vaadin 6.6+ in 1.0
Vaadin 7.0+ in 2.0
Vaadin 7.7+ in 2.2.0
Browser
Internet Explorer
Internet Explorer
Internet Explorer
Firefox
Safari

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online