fix: busy time in slot interval

This commit is contained in:
Paras Gupta 2021-05-10 02:48:12 +05:30
parent 3da430b577
commit 977e879406

View File

@ -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);
}
});
}