LOA-Datepicker-fix #115

Merged
Ajdj100 merged 5 commits from LOA-Datepicker-fix into main 2025-12-17 09:17:57 -06:00
Showing only changes of commit a95dbe2623 - Show all commits

View File

@@ -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(() => {
<PopoverContent class="w-auto p-0">
<Calendar
@update:model-value="(val: CalendarDate) => field.onChange(val.toDate(getLocalTimeZone()))"
layout="month-and-year" :min-value="today(getLocalTimeZone())" />
layout="month-and-year" :min-value="minStartDate || today(getLocalTimeZone())" />
</PopoverContent>
</Popover>
<div class="h-4">