From cf902e30d370ab86954189cd8192cd7ae9e8bc47 Mon Sep 17 00:00:00 2001 From: Hank Lin Date: Thu, 20 Aug 2020 13:54:24 +0800 Subject: [PATCH] fix: Fix top part of 24hour event in week/day view --- src/utils/TimeSlots.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/TimeSlots.js b/src/utils/TimeSlots.js index 1b962ac81..4132c10c3 100644 --- a/src/utils/TimeSlots.js +++ b/src/utils/TimeSlots.js @@ -131,7 +131,7 @@ export function getSlotMetrics({ min: start, max: end, step, timeslots }) { const rangeStartMin = positionFromDate(rangeStart) const rangeEndMin = positionFromDate(rangeEnd) const top = - rangeEndMin > step * (numSlots - 1) && !dates.eq(end, rangeEnd) + rangeEndMin > step * numSlots && !dates.eq(end, rangeEnd) ? ((rangeStartMin - step) / (step * numSlots)) * 100 : (rangeStartMin / (step * numSlots)) * 100