From a95dbe2623e3402e29f32356df6a8cbc78d67da0 Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Wed, 17 Dec 2025 10:06:56 -0500 Subject: [PATCH] Added backwards restriction check if end date is selected first --- ui/src/components/loa/loaForm.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/src/components/loa/loaForm.vue b/ui/src/components/loa/loaForm.vue index 50bc08e..73a96bd 100644 --- a/ui/src/components/loa/loaForm.vue +++ b/ui/src/components/loa/loaForm.vue @@ -134,6 +134,15 @@ const maxEndDate = computed(() => { } }) +const minStartDate = computed(() => { + if (values.type && values.end_date) { + let endDateObj = new Date(values.end_date.getTime() - values.type.max_length_days * 24 * 60 * 60 * 1000); + return new CalendarDate(endDateObj.getFullYear(), endDateObj.getMonth() + 1, endDateObj.getDate()) + } else { + return null; + } +}) + const memberFilter = ref(''); const filteredMembers = computed(() => { @@ -249,7 +258,7 @@ const filteredMembers = computed(() => { + layout="month-and-year" :min-value="minStartDate || today(getLocalTimeZone())" />