struts2 - jqgrid with datepicker not show? -


implement datepicker jqgrid , not list when add editoptions.

here code jsp

//javascript

function datepick (elem) {   alert("hellow 1");   jquery(elem).datepicker(       // {} // options here      $(elem).datepicker({dateformat:'yy.mm.dd'})   );  } function dateval(){  var currenttime = new date();  var month = parseint(currenttime.getmonth() + 1);  month = month <= 9 ? "0"+month : month;  var day = currenttime.getdate();  day = day <= 9 ? "0"+day : day;  var year = currenttime.getfullyear();  return year+"-"+month + "-"+day;  }  

//jqgrid

    <sjg:gridcolumn name="id" index="id" title="id"/><sjg:gridcolumn name="nombre"      index="nombre" title="name" sortable="true"   search="true" editable="true"/>      <sjg:gridcolumn name="fecha" index="fecha" title="fecha" editable="true"        formatter="date" edittype="text" editoptions="{datainit:function(el){          $(el).datepicker({dateformat:'yy-mm-dd'});},defaultvalue:dateval}"/>      </sjg:grid> 

///////update <3 solution in "loadatonce".


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -