Directory

← Back

datefield-quick-buttons

Extension for adding buttons to DateField

Author

Rating

Popularity

<100

This extension adds two buttons to DateField's popup calendar. You can use them to set the current date or clear the selected date.

Sample code

        DateField df = new DateField();

        DateFieldQuickButtonsExtension e = new DateFieldQuickButtonsExtension(() -> df.setValue(LocalDate.now()), () -> df.setValue(null));
        e.setButtonCaptions("Now", "Reset");
        e.setButtonClassNames("quick-button-1", "quick-button-2");
        e.extend(df);

Compatibility

1.02.0
(24.3)
(24.2)
(24.1)
(24)
(23)
(22)
(21)
(20)
(19)
(18)
(17)
(16)
(15)
(14)
(13)
(12)
(11)
(10)
8.9-8.21YY
8.1-8.8Y
(8.0)
(7.7)
(7.6)
(7.5)
(7.4)
(7.3)
(7.2)
(7.1)
(7.0)
(6.8)
(6.7)
(6.6)
(6.5)
(6.4)
(6.3)
(6.2)
(6.1)
(6.0)

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

--BREAKING CHANGE-- due to bugfix-related changes to DateField behavior in 8.9, there's a new version with simplified functionality. You can only have a "current date" and "clear" button with no specific server side listeners (use value change listeners instead). The buttons' captions can still be defined, as can CSS class names.

Released
2020-02-20
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.9+
Vaadin 8.1+ in 1.0
Browser
Browser Independent

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