To make sure that nobody will add event from 2pm to 2pm next day becouse it will be two-days event. And this kind of works but it’s pretty ugly - fullday checkbox is unchecked and time values are empty. If someone check’s fullday it add one day and make event day longer.
// fullday only
scheduler.attachEvent("onLightbox", function(){
var node = scheduler.formSection("time").node;
var sels = node.getElementsByTagName("select");
var start = sels.length - 4;//'end_date' inputs
sels[start].previousSibling.style.display='none';//hide 'dash'
for (var i=start; i<sels.length; i++)
sels[i].style.display="none";//hide selects
$(".dhx_fullday").hide(); // hide fullday checkbox
$(".dhx_section_time").css({
"position" : "absolute",
"left" : "120px"
});
$(".dhx_section_time select:first-child").hide(); // hide hours
});
That code hides blank space and make it looks better in my opinion.
But there is one more problem - in month view there is still possibility to drag over callendar and make more than one day events. Is there a simple way to disable that feature (draging in month view).
you can disable creating events by drag and drop when user switches to the month view, and keep it enabled for other views:scheduler.attachEvent("onViewChange", function (new_mode , new_date){
scheduler.config.drag_create = !(new_mode == "month");
});