How to disable a time slot.. When the duration is in between

I was trying to make a schedule in which all the dates will be shown with each date having time slots , the slots vary in size.. While I was trying to disable a slot .. I was facing a problem when
When the disable time doesn’t matches with the slot starting time.. Thus the slot is not disabled .. How can i solve the problem.?