Directory

← Back

MiniCalendar Add-on for Vaadin

MiniCalendar

Author

Rating

Popularity

200+

MiniCalendar is a server-only Vaadin component for displaying and selecting LocalDate values.

Please check out the documentation in the Github repository for more details.

Sample code

var miniCalendar = new MiniCalendar();

myView.add(miniCalendar);
var miniCalendar = new MiniCalendar();

miniCalendar.addValueChangeListener(event -> {
    Notification.show("Value changed to " + event.getValue());
});

miniCalendar.addYearMonthChangeListener(event -> {
    Notification.show("Value changed to " + event.getValue());
});

var registration = miniCalendar.addYearMonthChangeListener(...);

registration.remove();
var disabledDays = getDisabledDays();

var miniCalendar = new MiniCalendar();
miniCalendar.addThemeVariants(MiniCalendarVariant.HOVER_DAYS, MiniCalendarVariant.HIGHLIGHT_WEEKEND);
miniCalendar.setDayEnabledProvider(value -> !disabledDays.contains(value));
@Route("/styleprovider")
@PageTitle("MiniCalendar Showcase")
@CssImport("css/funky.css")
public class StyleProviderShowcaseView extends VerticalLayout {

    public StyleProviderShowcaseView() {

        var funkyDays = getFunkyDays();

        var miniCalendar = new MiniCalendar();
        miniCalendar.setValue(funkyDays.get(0));
        miniCalendar.addThemeVariants(MiniCalendarVariant.HOVER_DAYS, MiniCalendarVariant.HIGHLIGHT_WEEKEND);
        miniCalendar.setDayStyleProvider(day -> {
            if (funkyDays.contains(day)) {
                return List.of("funky", "bounce");
            }
            return null;
        });

        add(miniCalendar);
    }
}
var miniCalendar = ...

miniCalendar.addThemeVariants(MiniCalendarVariant.ROUNDED);
miniCalendar.addThemeVariants(MiniCalendarVariant.HIGHLIGHT_WEEKEND);

miniCalendar.removeThemeVariants(MiniCalendarVariant.HOVER_DAYS);

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

Vaadin 24 Upgrade

This release Bumps Vaadin to 24.0.3 and fixes a minor issue with a SLF4J dependency.

Read the full release notes on GitHub.

Released
2023-04-10
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 24+
Vaadin 23+ in 1.0.0
Browser
Browser Independent

MiniCalendar Add-on for Vaadin - Vaadin Add-on Directory

MiniCalendar MiniCalendar Add-on for Vaadin - Vaadin Add-on Directory
`MiniCalendar` is a [server-only](https://github.com/vaadin/addon-starter-flow) Vaadin component for displaying and selecting `LocalDate` values. **Please check out the documentation in the [Github repository](https://github.com/downdrown/vaadin-minicalendar) for more details.**
Online