0

I have had a problem with Fullcalendar for several days. My wish is this: I want to compare different event sources with eventSources; One source that offers availability time slots and another source that retrieves events taken by the user.

When events conflict, I want events from time slots to be deleted.

Do you have an idea or a lead I can explore? I think I should use "ClientsEvent" to retrieve all events, but how do I compare them and retrieve the conflicting events one by one? :/ Thank you for your help. Chris.

  • It sounds like something which would be better done by your database - it should not ever return availability slots which are already taken. I would think that's not too hard to implement using SQL. The calendar should just be displaying the events, and as far as possible avoid doing any processing on them. And of course when a user submits to create a new event in an "available" slot, the server should check again before creating it that no-one else took that slot in the meantime. – ADyson May 23 '18 at 14:24
  • Thank you very much for your comments. I had already thought about working in SQL & PHP, but I was afraid to see my pages become very slow at page loading. I guess I can sql compare events between them. I hope so. Thank you again for your remarks. Chris. – Christophe N May 23 '18 at 15:25
  • I think using SQL should be the most efficient way, if your database is well-structured. Should be no need for any PHP I wouldn't imagine. – ADyson May 23 '18 at 15:28
  • Can I compare each date entry with only SQL? How exactly can I do or get a lead? I'm not good at sql. :/ Thank you very much for the information already given. – Christophe N May 23 '18 at 15:46
  • Well, without seeing your exact data structure and some sample data it's hard to give any detailed advice, but if you have a table of (potentially) available slots, and a table of events, you should be able to select only slots where there isn't an event which overlaps the slot's time period. If you're still stuck, edit your question to provide the necessary info about your database, and show any query you've tried so far. Also please show an example of the expected result of your query when correct. – ADyson May 23 '18 at 19:49

0 Answers0