fix: busy time in slot interval

pull/180/head
Paras Gupta 2021-05-10 02:48:12 +05:30
parent 3da430b577
commit 977e879406
1 changed files with 5 additions and 0 deletions

View File

@ -149,6 +149,11 @@ export default function Type(props) {
if (dayjs(times[i]).add(props.eventType.length, 'minutes').isBetween(startTime, endTime)) { if (dayjs(times[i]).add(props.eventType.length, 'minutes').isBetween(startTime, endTime)) {
times.splice(i, 1); 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);
}
}); });
} }