From 439c288d74ae445ae02bd75718ede0c2b25af5d8 Mon Sep 17 00:00:00 2001 From: Adrian Hopek Date: Mon, 28 Mar 2022 13:58:26 +0200 Subject: [PATCH] #95 - fix --- resources/js/Pages/VacationRequest/Create.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/js/Pages/VacationRequest/Create.vue b/resources/js/Pages/VacationRequest/Create.vue index 2e55514..92508d2 100644 --- a/resources/js/Pages/VacationRequest/Create.vue +++ b/resources/js/Pages/VacationRequest/Create.vue @@ -401,7 +401,12 @@ function onFromChange(selectedDates, dateStr) { refreshEstimatedDays(form.from, form.to) } -function onToChange() { +function onToChange(selectedDates, dateStr) { + if (form.from === null) { + form.from = dateStr + + return + } refreshEstimatedDays(form.from, form.to) }