Method to check if a new event would overlap with existing overlapping events
See original GitHub issueHi!
I’m working with a side-project using fullcalendar-scheduler
. But, I have a problem when I want to create or update a new event on the same day and time. They are overlapped but I don’t want it. I read the documentation about this topic:
I was able to avoid an overlapping event when I drag and drop an event, but the problem is when I create an event, it overlaps an existing one.
My code is in CodePen .
Test Data:
- title: “Five”
- ID Resource: “5c264cc91dbe730d37e5a4b9” (Room F)
- start: “2018-12-30T08:00:00”
- end: “2018-12-30T09:00:00”
- ID Username: “5c264cd31dbe730d37e5a4bd”
Result
Can you help me, please? I would appreciate.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
FullCalendar Overlapping Events different color - Stack Overflow
I know that Fullcalendar has a method that checks if an event is overlapping with another ( it does this when using the...
Read more >How to check for overlapping events - Coda Maker Community
It checks to see if someone is assigned to multiple events and if those events overlap and if so it returns a count....
Read more >eventOverlap - Docs - FullCalendar
Determines if events being dragged and resized are allowed to overlap each other.
Read more >Multiple event with the same time overlap in the week and day ...
I am having this issue too, where when two events share the same start time, they overlap on the view, and only the...
Read more >Overlapping Events - ServiceMax Help
When a new event overlaps with any existing Work Order event or an existing Work Order event is edited in such a way...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I’m so sorry for the delay with my answer, but I was trying to resolve this problem. I was able to improve the MattDMo code in StackOverflow:
and I’ve tried some test cases, and It works! 😄, but I would appreciate that you can make your own test cases and confirm if it works. Please. 🙏🙏
Complete Example on Codepen
In your
submit
function, you could check if the range of the new event is within the range of any existing event and if it is you could show an error instead of adding the event to the calendar.Having something built-in to check for overlapping events could be useful so I’ll leave this open as a feature request.