Allow only fullday events


I want to make sure that users can add only fullday events. I’ve tried this:

scheduler.config.time_step = 60*24;
scheduler.config.event_duration = 60*24;

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.

Is there any way to make it work better.

you can try to hide a time and second date selectors. Check this post, it describes the similar thing


I’ve modified that code:

// 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]'none';//hide 'dash'
  for (var i=start; i<sels.length; i++)
  sels[i].style.display="none";//hide selects
  $(".dhx_fullday").hide(); // hide fullday checkbox
    "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).

Thanks, swist

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"); }); … event.html … onfig.html