Compare commits
7 Commits
1851f05687
...
feature/TT
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5cef6f71c3 | ||
|
|
362597e592 | ||
|
|
c7664dca39 | ||
|
|
7c5402ac12 | ||
|
|
4d401f64ee | ||
|
|
c6f11b19db | ||
|
|
db8dffaf95 |
@@ -13,15 +13,12 @@ import org.vaadin.crudui.crud.impl.GridCrud;
|
||||
import org.vaadin.crudui.form.CrudFormFactory;
|
||||
import org.vaadin.crudui.form.impl.form.factory.DefaultCrudFormFactory;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Locale;
|
||||
|
||||
final class TimeEntryFormConfigurer {
|
||||
|
||||
private TimeEntryFormConfigurer() {
|
||||
}
|
||||
private TimeEntryFormConfigurer() {}
|
||||
|
||||
static void configure(GridCrud<TimeEntry> crud, SerializableSupplier<TimeEntry> newInstanceSupplier) {
|
||||
CrudFormFactory<TimeEntry> formFactory = new DefaultCrudFormFactory<>(TimeEntry.class);
|
||||
@@ -47,21 +44,15 @@ final class TimeEntryFormConfigurer {
|
||||
formFactory.setFieldProvider("startTime", (TimeEntry bean) -> {
|
||||
TimePicker tp = new TimePicker("Start");
|
||||
tp.setRequiredIndicatorVisible(true);
|
||||
|
||||
tp.setLocale(Locale.of("de", "DE"));
|
||||
tp.setMin(LocalTime.of(5, 0));
|
||||
tp.setMax(LocalTime.of(23, 59));
|
||||
tp.setStep(Duration.ofMinutes(15));
|
||||
return tp;
|
||||
});
|
||||
formFactory.setFieldProvider("endTime", (TimeEntry bean) -> {
|
||||
TimePicker tp = new TimePicker("End");
|
||||
tp.setRequiredIndicatorVisible(true);
|
||||
tp.setLocale(Locale.of("de", "DE"));
|
||||
tp.setMin(LocalTime.of(5, 0));
|
||||
tp.setMax(LocalTime.of(23, 59));
|
||||
tp.setStep(Duration.ofMinutes(15));
|
||||
|
||||
return tp;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user