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;
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.
Hello Abu. I tried to find the mistake using FireBug but nothing. Can you help me please?. Thanks.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?