Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Radhika on Dec 11, 2009 09:31
open dhtmlx forum
scheduler - disable multi-day & make select (dropdown) a required field in the lightbox

Hi,

I have 2 questions:

1) Is there a way to disable multi-day events so that users cannot create them?

2) I have a dropdown (select list) in my lightbox and I would like to force the user to select a value i.e. make it a required field. Is there a way to enforce this from the frontend? (i can, from the backend but would prefer from the frontend).

 

Thanks,

Radhika

 

Answer posted by Alex (support) on Dec 14, 2009 01:20

Hello,

>> Is there a way to disable multi-day events so that users cannot create them?

There is no built-in flag. But you can try to disable drag-n-drop event creating in month view and make some changes in the time block of teh details form:

scheduler.attachEvent("onBeforeDrag",function(id,drag_mode){

    return !(drag_mode=="create" && this._mode == "month");

}

var setter = scheduler.form_blocks.time.set_value;

scheduler.form_blocks.time.set_value=function(node,value,ev){

  var selects = document.getElementsByTagName("select");

  selects[1].disabled = true;

  selects[5].disabled = true;


 setter.apply(this,arguments);
}