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) }