Hello. I found that when we use a simple search and the fiel is of type date the result is empty when in fact there are records to show. Here´s my code:
…
$col = array();
$col["name"] = "fecha_entrega";
$col["title"] = "Fecha Entrega";
$col["formatter"] = "date";
//Here i change the format of the field to "d/m/Y".
$col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y');
$col["width"] = "120";
$col["editrules"] = array("required"=>true);
$cols[] = $col;
…
$g->set_actions
(
array
(
"add"=>true,
"edit"=>true,
"clone"=>true,
"bulkedit"=>false,
"delete"=>true,
"view"=>true,
"rowactions"=>true,
"export"=>false,
"autofilter"=>true,
"search"=>"simple",
"inlineadd"=>false,
"showhidecolumns"=>false
)
);
When i see the database (in mysql) and the corresponding table the type of the field is "Y-m-d", as is has to be because that is the format of type date in mysql.
My question is, is possible that the grid don´t the the correct format (that is Y-m-d) when it has to compare?. Remember that the datepicker give the date in the form of d/m/Y.
Thanks for your help.
Hello. Thanks for your help. The update, that solve the problem of a custom search in a field of type date works excelente. But now the inline search, that was working fine, in a field of type date doesn´t work. Do you now why?. This search use the equal criteria to get records, and it is still usefull.
Thnks again.
Hello Abu. I tried to find the mistake using FireBug but nothing. Can you help me please?. Thanks.