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.**
View on GitHub
Online Demo

MiniCalendar Add-on for Vaadin version 1.0.0
### Initial Release This is the initial release of my `MiniCalendar` Addon. #### Shipped Features - Displaying and selecting `LocalDate` values - Various Theme Variatouns to adapt the component appearance - Dynamically apply CSS classes to the day components with a `DayStyleProvider` - Dynamically en- or disable day components with a `DayEnabledProvider` - Listen to value changes - Listen to month switches For more details and code samples please check out the `README.md` in the repository.

MiniCalendar Add-on for Vaadin version 1.1.3
### Features, Improvements This release contains a few new features as well as usability improvements. I also created a separate Showcase module that let's you click through some examples. Unfortunately I broke the release automation during this implementation a few times, you can read more about that in my [GitHub Release history](https://github.com/downdrown/vaadin-minicalendar/releases/tag/1.1.1). ##### Included Changes * [#1](https://github.com/downdrown/vaadin-minicalendar/issues/1) Direct Month / Year selection should be more user-friendly * [#3](https://github.com/downdrown/vaadin-minicalendar/issues/3) Make TextFormat for days configurable * [#2](https://github.com/downdrown/vaadin-minicalendar/issues/2) Add deployable & locally startable Showcase to the project

MiniCalendar Add-on for Vaadin version 1.1.4
### Features, Improvements This release contains a few new features as well as usability improvements. I also created a separate Showcase module that let's you click through some examples. Unfortunately I broke the release automation during this implementation a few times, you can read more about that in my [GitHub Release history](https://github.com/downdrown/vaadin-minicalendar/releases/tag/1.1.1). ##### Included Changes * [#1](https://github.com/downdrown/vaadin-minicalendar/issues/1) Direct Month / Year selection should be more user-friendly * [#3](https://github.com/downdrown/vaadin-minicalendar/issues/3) Make TextFormat for days configurable * [#2](https://github.com/downdrown/vaadin-minicalendar/issues/2) Add deployable & locally startable Showcase to the project

MiniCalendar Add-on for Vaadin version 1.2.0
### First minor release This release includes the Update to Vaadin 23.3.5. Also I finally managed to add a Dockerfile to the showcase module and automatically publish a new Docker build on every release. To read the full release notes please visit the [GitHub Release Page](https://github.com/downdrown/vaadin-minicalendar/releases/tag/1.2.0)

MiniCalendar Add-on for Vaadin version 1.3.0
### Fixing publishing issues This release fixes the publishing issues where the Add-on was published to the Vaadin Add-on repository but could not be used in any project because it was referencing a non-published parent `pom.xml`. To read the full release notes please visit the [GitHub Release Page](https://github.com/downdrown/vaadin-minicalendar/releases/tag/1.3.0)

MiniCalendar Add-on for Vaadin version 1.4.0
### 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](https://github.com/downdrown/vaadin-minicalendar/releases/tag/1.4.0).

Online