Skip to content

Commit ab761d9

Browse files
committed
clamp running time entry duration to min 0 for FullCalendarHeaderDuration calc
1 parent 50d6039 commit ab761d9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

resources/js/packages/ui/src/FullCalendar/useCalendarEvents.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ export function useCalendarEvents(params: {
265265
'seconds'
266266
);
267267
} else {
268-
durationSeconds = params.currentTime.value.diff(
269-
getDayJsInstance()(entry.start),
270-
'seconds'
268+
durationSeconds = Math.max(
269+
0,
270+
params.currentTime.value.diff(getDayJsInstance()(entry.start), 'seconds')
271271
);
272272
}
273273

0 commit comments

Comments
 (0)