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

Packaged for Vaadin 7.7.7, Java8

Released
2017-03-13
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.7+
Vaadin 7.0+ in 2.1.0
Vaadin 6.6+ in 1.0
Vaadin 6.7+ in 0.6
Vaadin 6.2+ in 0.5
Browser
Internet Explorer
Firefox
Safari
Google Chrome
Internet Explorer
Internet Explorer

StyleCalendar - Vaadin Add-on Directory

A simple calendar component. StyleCalendar - Vaadin Add-on Directory
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.
Online