Ok bear with me on this one, I’ll try and simplify this as much as I can.
Lets say I have a Custom Post Type of “Events”
In those events I have a checkbox field for different kinds of events
In each post I have 2 date/time pickers one for start time and one for end time. If a start time is in the future the post status is set to “scheduled”.
I’d like to do a check so no two types of events can be scheduled during the same time. So no two birthday events can have overlapping start and stop times.
My first thought was to query any posts that are currently have a status of publish or future, then compare all that have the same type checkbox and then compare date/times but I’m not sure if I’m over complicating things…or not complicating things enough.
It is rather simple, but yes, you would need to validate both the start and end date and you would have to do one or more queries check the posts. Yes it would be complicated because you’re talking about (I think) basing uniqueness on 3 different fields.