Ionic2-Calendar
Ionic2-Calendar copied to clipboard
Problem with overlap detection between events
I'm using this calendar for a simple time logging application. However, I'm currently facing the following issue:
When 2 bookings are logged on the same day it sometimes falsely detects an overlap. For example the following bookings should not be displayed as an overlap:
The first one ends at 12:40 and the second one starts at 12:40. If I change the time to 12:45 it displays correctly
Am I missing something here? Is there anyway to fix this issue?
@baeteja The end time of the first event should be 12:39, then they are considered not overlapped. I need to leave some buffer during the overlap calculation, because of the float number precision.
I'm having the same issue. It indeed seems like there is a floating point precision issue here.
Would it be an idea to introduce an overlapThreshold
option/setting for this? Or at least update the calculation to ignore overlaps if the time difference is negligible (i.e. due to floating point precision)?
I've tried decreasing the step
size, but that didn't help unfortunately.
Your help is much appreciated!