Sometimes I have items in the scheduler with a duration of 0 minutes (eg. 08.00-08.00 hrs). It shows in the scheduler as an item with the same start time as it ends.
When I drag and drop this item to another location, it automatically changes the end time to be 15 minutes later than the new start time.
How can I prevent this?
I’ve got v3.0 of the scheduler in an Apache with PHP environment.
Some config:
scheduler.config.show_loading = true; // 'Laden' afbeelding laten zien
scheduler.config.details_on_create = true;
scheduler.config.details_on_dblclick = true;
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.config.prevent_cache = true;
scheduler.config.first_hour = 7; // Planning laten beginnen om 7 uur
scheduler.config.last_hour = 22; // Planning laten eindigen om 22 uur
scheduler.config.time_step = 15; // Per 15 minuten scrollen
scheduler.config.scroll_hour = 7; // Bovenaan 7 uur zetten
scheduler.config.icons_select = ["icon_details", "icon_delete", "icon_custom", "icon_custom2", "icon_custom3", "icon_custom4"]; // Welke icoontjes laten zien als er wordt geklikt op een item
scheduler.config.multi_day = true; // Multiday in de planning tonen
scheduler.config.full_day = true; // Balk voor hele dag (Boven 00:00 uur)
scheduler.config.hour_size_px = 60; // De hoogte van een uur op 60px zetten
scheduler.config.default_date = "%l %j %F"; // Formaat van de datum
// Tooltip opties
dhtmlXTooltip.config.className = 'dhtmlXTooltip tooltip';
dhtmlXTooltip.config.timeout_to_display = 0;
dhtmlXTooltip.config.delta_x = -200;
dhtmlXTooltip.config.delta_y = -10;
// Standaard geen tree ID
scheduler._dragged_tree_item = false;
The code for the onEventChanged event:
$.ajax({
url: APP_URL + 'ajax.php',
dataType: 'json',
data: 'do=saveWerkbonTijd&wbn_id=' + event_object.wbn_id +
'&wbn_administratie=0' +
'&wbn_medewerker=' + event_object.mwr_contact_id +
'&wbn_start=' + $.date('Y-m-d H:i:s', parseInt(sd.getTime()/1000)) +
'&wbn_eind=' + $.date('Y-m-d H:i:s', parseInt(ed.getTime()/1000)),
async: false,
success: function(json){
if(json.message != 'OK'){
alert(json.message);
}
}
});