diff --git a/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java b/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java index 41f37d1..8abc086 100644 --- a/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java +++ b/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java @@ -240,6 +240,11 @@ public class RequestRegisterView extends VerticalLayout { int startYear = calculateStartYear(previousRequests); startDate = determineStartDate(vacation, startYear); + + if (startDate.isBefore(LocalDate.now())) { + startDate = determineStartDate(vacation, startYear + 1); + } + if (startDate != null) { endDate = startDate.plusDays(vacation.getExpiration().intValue() - 1); } else {