fix: calendar day filter
This commit is contained in:
@@ -103,8 +103,14 @@ import { useAuthStore } from '../stores/auth';
|
||||
|
||||
const handleUpdatedPeriod = async(ev) => {
|
||||
const global = filter.value.value === 'general' ? 1 : 0;
|
||||
let start = new Date(ev.start);
|
||||
let end = new Date(ev.end);
|
||||
startDate.value = formatOnlyDate(ev.start)
|
||||
endDate.value = formatOnlyDate(ev.end)
|
||||
if( (start.getMonth() === end.getMonth()) && (start.getDate() === end.getDate()) ) {
|
||||
startDate.value = formatOnlyDate(start) + ' 00:00:00';
|
||||
endDate.value = formatOnlyDate(end) + ' 23:59:59';
|
||||
}
|
||||
await getCalendarDate(startDate.value, endDate.value, global);
|
||||
mapLoadsToEvents()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user