diff --git a/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java b/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java index 3dcd9c3..1ff9172 100644 --- a/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java +++ b/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java @@ -91,11 +91,8 @@ public class RequestRegisterView extends VerticalLayout { endDatePicker.setMin(startDate); endDatePicker.setMax(endDate); - startDatePicker.clear(); - endDatePicker.clear(); - getUI().ifPresent(ui -> ui.access(() -> { - startDatePicker.setInitialPosition(startDate); - })); + startDatePicker.setValue(startDate); + endDatePicker.setValue(startDate.plusDays(vacation.getDuration().intValue() - 1)); } private void updateDatePickerMinValues() {