Added a check if thtere is not enough time on the calendar.