From 977e879406e8080b1f29edea47e124484ac675f2 Mon Sep 17 00:00:00 2001 From: Paras Gupta Date: Mon, 10 May 2021 02:48:12 +0530 Subject: [PATCH] fix: busy time in slot interval --- pages/[user]/[type].tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pages/[user]/[type].tsx b/pages/[user]/[type].tsx index 3e06a2000e..38ca403a30 100644 --- a/pages/[user]/[type].tsx +++ b/pages/[user]/[type].tsx @@ -149,6 +149,11 @@ export default function Type(props) { if (dayjs(times[i]).add(props.eventType.length, 'minutes').isBetween(startTime, endTime)) { times.splice(i, 1); } + + // Check if startTime is between slot + if(startTime.isBetween(dayjs(times[i]), dayjs(times[i]).add(props.eventType.length, 'minutes'))) { + times.splice(i, 1); + } }); }