Question

I'm using dthtml scheduler calender,(with mvc 3) In this demo tutorial , http://carrental-app.scheduler-net.com/ It is not allowing to book the same car for same timing period for different customers. (for example: If I book Dodge Caliber from 1:00 to 2:00 for customer A , I'm not able to book it for customer B for 1:30 to 2.30. Though we cannot book the same car for conflicting time, i want both conflicting appointment to get displayed side by side).

I'm using this scheduler in my project for booking appointment,so it is normal to get conflicting appointments. Now i want to know how to change this scheduler following ways: (i)Scheduler calender allows conflicting appointments. (ii)The conflicting appointments has to be shown side by side

This is a sample image. This is how I need two conflicting appointments to appear in scheduler calender. sample.png (9.83 KiB)

Was it helpful?

Solution

1)Conflicting events can be allowed conditionally with a client-side code js:

scheduler.attachEvent("onEventCollision", function (ev, evs) {
   return false;//allow collision
   //or 
   //return true; to cancel conflicting event
});

2)And here display settings for appointments c#:

protected void _ConfigureViews(DHXScheduler scheduler, IEnumerable cars)
{
       //show appointments side-by-side
       scheduler.Config.cascade_event_display = true;

       var units = new TimelineView("Orders", "car_id");
       ...
       //set minimum heigth of event bar
       units.EventDy = units.EventMinDy  = units.Dy - 5;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top