Using jqGrid 4.6, I am trying to have a datapicker appear in the search dialog when clicking on the relevant field against a date input – ‘Assigned’ in this case. The example in the documentation is for a js implementation. What is the correct syntax for a php implementation please? The following displays no errors but does not display the datepicker.
// Change some property of the field(s)
$grid->setColProperty(“TestAssignmentID”, array(“label”=>”ID”, “width”=>30, “hidden”=>true));
$grid->setColProperty(“Name”, array(“label”=>”Test”, “width”=>170, “sorttype”=>”string”, “resizable”=>true, “formatter”=>”showlink”, “formatoptions”=>array(“baseLinkUrl”=>”../TestAssignment/index.php”,”addParam”=>”&Action=show”)));
$grid->setColProperty(“CandidateName”, array(“label”=>”Name”, “width”=>100, “resizable”=>true));
$grid->setColProperty(“CreatedAt”, array(“label”=>”Assigned”,”width”=>80, “resizable”=>false,”formatter”=>”date”, “formatoptions”=>array(“srcformat”=>”Y-m-d H:i:s”, “newformat”=>”j M Y H:i:s”),”sorttype”=>”date”,
“searchoptions”=>array(
“dataInit”=>” function (element) {
$(element).datepicker({
id: ‘assigned_datePicker’,
dateFormat: ‘yy-mm-dd’,
//minDate: new Date(2010, 0, 1),
maxDate: new Date(2020, 0, 1),
showOn: ‘focus’
});
}”
)));
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top