date-time-fields Add-on
Vaadin date-time-fields Add-on
Date-time-fields is a UI component add-on for Vaadin 7. At the moment it adds Field-Components for DateTime, LocalTime, Interval and DateTimeAndLocalTime.
Date-Time-Fields Shortcuts
By adding the shortcuts your customer will be able to enter dates in a very fast Way.
Locale EN / DEFAULT
Press n -> todays date
Press t -> tomorrows date
Press y -> yesterdays date
Press + -> add one day to date
Press - -> minus one day to date
Locale DE
Press h -> todays date
Press m -> tomorrows date
Press g -> yesterdays date
Press + -> add one day to date
Press - -> minus one day to date
This functionality is very useful for adding appointments, invoices and many other usecases.
Sample code
final DateTimeDemoBean demoBean = new DateTimeDemoBean(); BeanItem<DateTimeDemoBean> demoBeanItem = new BeanItem<DateTimeDemoBean>(demoBean); final FieldGroup fieldGroup = new FieldGroup(demoBeanItem); fieldGroup.setFieldFactory(new JodaTimeFieldGroupFieldFactory()); final DateTimeField dateTimeField = (DateTimeField) fieldGroup.buildAndBind("dateTime"); dateTimeField.populateDateTimeShortCutListener(Locale.getDefault()); addComponent(dateTimeField);
Links
Compatibility
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
- Released
- 2017-10-13
- Maturity
- STABLE
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 7.7+
- Browser
- N/A
date-time-fields Add-on - Vaadin Add-on Directory
Vaadin date-time-fields Add-onIssue Tracker
Source Code
Online Demo
date-time-fields Add-on version 1.0.0
null
date-time-fields Add-on version 1.0.1
Adding listener is changed:
final DateTimeDemoBean demoBean = new DateTimeDemoBean();
BeanItem