Directory

← Back

Year Month Calendar Add-on

Full year / month calendar for Vaadin 22+

Author

Rating

Popularity

600+

This addon can display a whole year calendar in one component.

Features

  • Java API for applying CSS class names to specific dates
  • Selection listener
  • Responsive layout

Sample code

    YearCalendar calendar = new YearCalendar();

    calendar.setClassNameGenerator(date -> {
      if (TestUtils.isPublicHoliday(date)) {
        return "holiday";
      }
      if (date.getDayOfWeek() == DayOfWeek.SATURDAY || date.getDayOfWeek() == DayOfWeek.SUNDAY) {
        return "weekend";
      }
      return null;
    });

    Span selectedDate = new Span();
    calendar.addDateSelectedListener(ev -> {
      selectedDate.setText("Selected date: " + ev.getDate());
    });

    Span instructions = new Span("Use arrow keys or Ctrl+arrow keys to move.");
    add(new HorizontalLayout(instructions, selectedDate), calendar);

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

New features:

  • Add i18n support to InlineDatePicker (#82)
Released
2024-09-10
Maturity
TESTED
License
Apache License 2.0

Compatibility

Framework
Vaadin 24.4
Vaadin 23 in 2.0.2
Vaadin 22 in 2.0.0
Vaadin 24 in 3.0.0
Browser
N/A

Year Month Calendar Add-on - Vaadin Add-on Directory

Full year / month calendar for Vaadin 22+ Year Month Calendar Add-on - Vaadin Add-on Directory
This addon can display a whole year calendar in one component. ### Features * Java API for applying CSS class names to specific dates * Selection listener * Responsive layout
Online Demo
Issue tracker
View on GitHub
Author Homepage

Year Month Calendar Add-on version 2.0.0
Initial release

Year Month Calendar Add-on version 2.0.1
### Bugfixes • Ctrl+arrow keys feature does not work in Firefox ([#2](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/2))

Year Month Calendar Add-on version 2.0.2
### Bugfixes * Fix Vaadin 23 compatibility issue

Year Month Calendar Add-on version 2.1.0
#### New features: * feat: add inline date picker * feat: implement HasTheme ([#14](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/14)) * feat: add yearMonth setter ([#13](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/13))

Year Month Calendar Add-on version 2.1.1
#### Bug fixes: - Avoid timezone conversion that results in wrong date ([#18](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/18)).

Year Month Calendar Add-on version 2.2.0
#### Bug fixes: * Prevent focusing the host element on Shift Tab * Fix InlineDatePicker initialization #### New features: * Add support for setWeekNumbersVisible in InlineDatePicker

Year Month Calendar Add-on version 2.3.0
#### Bug fixes: * cleanup CSS styles on empty day cells ([#32](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/32)) * add year value change listener to YearCalendar component ([#43](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/43)) * fix arrow keys navigation ([#26](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/26)) * display weekdays short description on InlineDatePicker

Year Month Calendar Add-on version 3.0.0
Version compatible with Vaadin 24.0. #### New features: * New major version for Vaadin 24 * Change delegate-focus-mixin.js path #### Bug fixes: * fix Vaadin 24 compilation error ([#45](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/45))

Year Month Calendar Add-on version 2.3.1
#### Bug fixes: * cleanup CSS styles on empty cells in MonthCalendar ([#58](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/58))

Year Month Calendar Add-on version 3.0.1
Version compatible with Vaadin 24.0. #### Bug fixes: * cleanup CSS styles on empty cells in MonthCalendar ([#58](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/58))

Year Month Calendar Add-on version 4.0.0
Version compatible with Vaadin 24.1

Year Month Calendar Add-on version 4.1.0
#### New features: * Add i18n support to YearMonthField ([#64](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/64)) #### Bug fixes: * Ignore browser timezone when parsing selected value ([#59](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/59)) * Include components in the frontend bundle for production builds ([#73](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/73))

Year Month Calendar Add-on version 4.2.0
#### New features: * Add support for min and max limits ([#75](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/75))

Year Month Calendar Add-on version 4.2.1
#### Bug fixes: * Refresh web component after updating i18n ([#78](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/78))

Year Month Calendar Add-on version 4.3.0
#### New features: * Add i18n support to InlineDatePicker ([#82](https://github.com/FlowingCode/YearMonthCalendarAddon/issues/82))

Online