From 2c30bed91f1caa4cae8c8e870ecd2750cd973462 Mon Sep 17 00:00:00 2001 From: ricardo051199 Date: Sun, 20 Oct 2024 15:11:24 -0400 Subject: [PATCH] =?UTF-8?q?#55=20Perfil=20de=20Personal=20Administrativo?= =?UTF-8?q?=20-=20A=C3=B1adir=20Vacaciones=20del=20Empleado=20(Actualizar?= =?UTF-8?q?=20automaticamente=20fechas)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../primefactorsolutions/views/RequestRegisterView.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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() {