Bug in a "Simple" search.

QuestionsBug in a "Simple" search.
Montemaggiore Sebastian asked 10 years ago

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.

4 Answers
Abu Ghufran answered 10 years ago

Emailed you an update.

Montemaggiore Sebastian answered 10 years ago

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.

Montemaggiore Sebastian answered 10 years ago

Hello Abu. I tried to find the mistake using FireBug but nothing. Can you help me please?. Thanks.

Abu Ghufran answered 10 years ago

A fix was required, i've emailed you the update.

Your Answer

6 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?