How to check for double reservations/overlap (repeating events)?

2 posts, 0 answers
  1. Gert
    Gert avatar
    26 posts
    Member since:
    Jan 2015

    Posted 29 Jul 2015 Link to this post

    Dear Teleruik-Team,

    Our Kendo Schedular is working very fine for booking cars and meeting rooms, but we have one big problem.It is possible to book the same car or room on the same moment and that cannot be possible. No overlaps may ​occur !
    How can we check if a certain resource is already booked at a given day/time ? The biggest problem are the repeating events ! Because the contain a start date and a formula.

    So what we need :

    1) someone adds a reservation by clicking on a day

    2) Schedular checks if resource is already reserved (also reperating events/reservations)

    3) if ok, reservation is booked , else an errormessage is being displayed

    How can wo do this ?

    Regards,

    Gert

     


     

  2. Gert
    Gert avatar
    26 posts
    Member since:
    Jan 2015

    Posted 30 Jul 2015 Link to this post

    Ok, found the solution :

     

    save: function(e)
    {                                 
                var scheduler = $("#scheduler").data("kendoScheduler");
                var events = scheduler.occurrencesInRange(e.event.start,e.event.end);
                if (events.length>1) //new event is included, that's why > 1
                {
                            alert('Overlap!!');
                            e.preventDefault();
                            return;
                 }

Back to Top