CalendarKit icon indicating copy to clipboard operation
CalendarKit copied to clipboard

When events are overlap , delegate method is called for least event

Open nickp4488 opened this issue 1 year ago • 1 comments

Hello, thanks a lot for awesome Library @richardtop!

Recently, I implemented this library in my project & got an issue as follow

Example : Event1 : start 12 AM to 11 PM (Blue) Event2: start 1:30 AM to 1:40 AM (Orange)

When both events are overlap & eventsWillOverlap = true, the delegate method is just call for event1 , instead of event 2.

If I set eventsWillOverlap = false & try to tap on event, it is working fine.

Screenshot 2023-12-28 at 11 16 01 PM

Am I doing any mistake here?

How can we achieve to call top most event for delegate call.

nickp4488 avatar Dec 28 '23 17:12 nickp4488

Hello, could you please provide the sample code to reproduce the issue? I.e. create a sample project and/or just list your DayViewController with minimal amount of code to reproduce it.

From my point of view, the delegate method should be called for the "topmost" event. i.e. since the larger (longer) event is in the background and can be tapped at other positions (e.g. 12:30 AM), the smaller (shorter) events should take the priority.

From my perspective, this is a bug in the library. Looking forward to more thoughts from you.

richardtop avatar Jan 01 '24 16:01 richardtop