New event added to row below the one clicked

Hi,

I have two schedulers on a page. When I click a cell in one, it adds a new event to the row clicked. In the other, when I click a cell it adds a new event to the row directly below it. I have used the same code for adding the event. Does anyone have any ideas what may be causing this?

James :slight_smile:

Hi,
please provide some kind of demo, so we could reproduce the issue

Hi,

I can’t provide a working sample as it is too heavily embedded within an application. Looking at the actual javascript in the debugger, the section passed back from the scheduler.getActionData(e) call relates to the data that is for the row directly below.

I can provide you a snippet of the code that is generated/used:

.dhx_cal_event_line { line-height:30px; } .dhx_matrix_scell { max-width:200px; }
 
 
<div class='dhx_cal_tab'

name=‘Vehicles_tab’ style=‘left:76px;’>





			</div><script>
window.vehicleScheduler = Scheduler.getSchedulerInstance();

vehicleScheduler.config.serverLists = {};vehicleScheduler.serverList(“sl_1_635211522203642326”,

[{Id:11494,Name:"Mitsubishi Outlander

SUV",AccessibleSeats:5,NonAccessibleSeats:0,ImageURL:"/Content/images/default-entity-

images/asset.png",key:11494,label:“Mitsubishi Outlander SUV”},{Id:11495,Name:"E-

350",AccessibleSeats:4,NonAccessibleSeats:0,ImageURL:"/Content/images/default-entity-

images/asset.png",key:11495,label:“E-350”},{Id:11510,Name:"Dodge

Caravan",AccessibleSeats:6,NonAccessibleSeats:0,ImageURL:"/Content/images/default-entity-

images/asset.png",key:11510,label:“Dodge Caravan”},{Id:11512,Name:"Cadillac CTS-V

Convertible",AccessibleSeats:4,NonAccessibleSeats:0,ImageURL:"/CustomerFiles/5381/Attachments/Photos/Thumbs/7c5779

fa-4429-4587-a700-a01e9d949e93.jpg",key:11512,label:“Cadillac CTS-V Convertible”},{Id:11515,Name:"Cheverolet

Impala",AccessibleSeats:4,NonAccessibleSeats:0,ImageURL:"/Content/images/default-entity-

images/asset.png",key:11515,label:“Cheverolet Impala”},{Id:11521,Name:"7 Seater Passenger

Van",AccessibleSeats:6,NonAccessibleSeats:0,ImageURL:"/Content/images/default-entity-

images/asset.png",key:11521,label:“7 Seater Passenger Van”},{Id:11525,Name:"E-

Bus",AccessibleSeats:10,NonAccessibleSeats:0,ImageURL:"/Content/images/default-entity-

images/asset.png",key:11525,label:“E-Bus”}]);

vehicleScheduler.locale.labels.Vehicles_tab = ‘Timeline’;
vehicleScheduler.config.serverLists[“Vehicles”] = “sl_1_635211522203642326”;
vehicleScheduler.createTimelineView({“fit_events”:true,
“name”:“Vehicles”,
“y_property”:“vehicle_id”,
“x_unit”:“hour”,
“x_step”:1,
“x_size”:12,
“x_length”:24,
“x_start”:0,
“dx”:200,
“dy”:50,
“render”:“bar”,
“event_dy”:30,
“y_unit”:vehicleScheduler.serverList(“sl_1_635211522203642326”)
});

vehicleScheduler.config.details_on_create = true;
vehicleScheduler.config.details_on_dblclick = true;
vehicleScheduler.config.prevent_cache = true;
vehicleScheduler.config.time_step = 15;
vehicleScheduler.config.wide_form = true;
vehicleScheduler.xy.bar_height = 76;

vehicleTemplate();

vehicleScheduler.addMarkedTimespan({days:0,zones:[96, 350],css:"entire_journey_section"});
vehicleScheduler.addMarkedTimespan({days:1,zones:[96, 350],css:"entire_journey_section"});
vehicleScheduler.addMarkedTimespan({days:2,zones:[96, 350],css:"entire_journey_section"});
vehicleScheduler.addMarkedTimespan({days:3,zones:[96, 350],css:"entire_journey_section"});
vehicleScheduler.addMarkedTimespan({days:4,zones:[96, 350],css:"entire_journey_section"});
vehicleScheduler.addMarkedTimespan({days:5,zones:[96, 350],css:"entire_journey_section"});
vehicleScheduler.addMarkedTimespan({days:6,zones:[96, 350],css:"entire_journey_section"});
vehicleScheduler.addMarkedTimespan({days:0,zones:[240, 250],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:1,zones:[240, 250],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:2,zones:[240, 250],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:3,zones:[240, 250],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:4,zones:[240, 250],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:5,zones:[240, 250],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:6,zones:[240, 250],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:0,zones:[330, 350],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:1,zones:[330, 350],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:2,zones:[330, 350],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:3,zones:[330, 350],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:4,zones:[330, 350],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:5,zones:[330, 350],css:"appointment_section"});
vehicleScheduler.addMarkedTimespan({days:6,zones:[330, 350],css:"appointment_section"});
vehicleScheduler.init('vehicleScheduler_here',new Date(2013,9,23),'Vehicles');
vehicleScheduler.attachEvent("onEventCollision", function(ev, evs){ var c = 0, l = 

vehicleScheduler.config.collision_limit;for (var i=0; i<evs.length; i++) { if ((ev.vehicle_id == evs

[i].vehicle_id)&& ev.id != evs[i].id) c++; } return !(c < l);});





Cancel

On further investigation, the problem occurs in chrome but not in IE10.

In chrome if you change days and then click on a row the event appears in the correct row. If you click without changing the row it appears in the row below.