Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Prashant on Jan 15, 2010 07:04
open dhtmlx forum
dhtmlxScheduler + detail form + max length

Hi

It would be really great If we can add some of the html attribute like max length while initializing the scheduler itself.

-Prashant
Answer posted by Alex (support) on Jan 15, 2010 07:49

Hello,

you can customize description block (its set_value method) as follows:

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

  node.firstChild.value=value||"";
  var ta = document.getElementsByTagName("textarea")[0];
  ta.onkeypress = function(e){
  return (ta.value.length < MAX_LENGH) 

 }

}

Where MAX_LENGH is some value that limits a number to characters that can be typed by a user.