handle all day events

Fixed error that occurred when events were all day events