Is it possible to create a calendar so that events do not overlap? I wish the user does not have the option to select time if someone has already taken this time. As you can see in the picture below, 2 different users booked the same car. One is from 09-12 and another user chose the same car from 11-16. So both have booked the same car between 11-12 which is not acceptable. So I just want if one user selected from 9-12 another can not select that time and need to select from 12-16.
Hej Zhivko,
Is it possible to create a calendar so that events do not overlap?
I wish the user does not have the option to select time if someone has already taken this time. As you can see in the picture below, 2 different users booked the same car. One is from 09-12 and another user chose the same car from 11-16. So both have booked the same car between 11-12 which is not acceptable.
So I just want if one user selected from 9-12 another can not select that time and need to select from 12-16.
Hi,
I wrote a code for a client some time ago that prevents users adding event if it overlaps.
You can give it a try. Place the code in your active theme functions.php file
Stachethemes Developer
Hi Zhivko,
i tried that script but it seems it is not working 100%.
f.ex. i booked in calendar one date 9 mar. 2021 17:00:00 to 9 mar. 2021 19:00:00.
If i try to book 9 mar. 2021 17:00:00 to 9 mar. 2021 19:00:00 it says that date time is closed.
But if i try 9 mar. 2021 18:00:00 to 9 mar. 2021 19:00:00. it let me book event.
Than i tried to find out what could be problem and i can see that variable
is going one hour in plus.
So if set time to 18 and output variable it says that it is 19. How can we fix that?
I tried to change UTC time on my site, and on calendar and it doesn't help.
I think I've sent you the wrong solution...
Please try the one I've attached here.
Stachethemes Developer
Perfect Zhivko.
This is working great.
Thank you very much.