There is nice PopupDateField-class that I use to edit timestamps and dates. Is there a component that allows similar editing for time only? If I set PopupDateField resolution so that time is editable, date becomes also visible and now I’d need editor for time only.
Not as far as i know but you could:
A: Try to create one with plain Vaadin Components
B: Take an existing TimePicker GWT Component (for example from
here ) and integrate it using
this tutorial
C: Use an existing Javascript Component (for example from
here ) and integrate it like
this
D: Write a gwt or js component yourself and integrate it in Vaadin
When using Vaadin 7 the integration isn’t as difficult as it may sound.
P.S. Found one already existing in the directory but i personally find that the gwt ones looked better.
TimeField Addon for Vaadin
You can also do it buy building a server side component containing 2 or 3 select components. I’ve done an
add-on for the date part of it, but it would be just as straight forward to show the time part.
DateField df = new DateField("My time has come"); // popup date field
df.setResolution(Resolution.SECOND);
df.setLocale(Locale.GERMANY); // just because I dislike AM/PM and want 24h format
df.addStyleName("time-only");
Just an update for above answer. In Vaadin 8 there is now a DateTimeField and InlineDateTimeField. They use the same CSS classes, so only difference is class name and Resolution enum is changed to DateTimeResolution.
I encountered a strange problem, if I set time like this: