filter date

Questionsfilter date
Samuel asked 1 month ago

I have this code

 

$col = array();
$col[“title”] = “ARRIVAL DATE”;
$col[“name”] = “FS_ARRIVAL_DATE”;
$col[“formatter”] = “date”;
$col[“formatoptions”] = array(“srcformat” => “Y-m-d”, “newformat” => “d/m/Y”); // Ajusta según tu necesidad
$col[“searchoptions”] = array(
    “sopt” => array(“eq”), // Tipos de búsqueda permitidos, aquí solo “equals”
    “dataInit” => “function(elem) { $(elem).datepicker({dateFormat: ‘d/m/Y’}); }”
); // Configura el filtro con un datepicker correctamente
$col[“width”] = “80”;
$col[“editable”] = false;
$cols[] = $col;

an I try to filter this an it trhown me white fields.

2 Answers
Samuel answered 1 month ago

Now with this code

$col = array();
$col[“title”] = “ARRIVAL DATE”;
$col[“name”] = “FS_ARRIVAL_DATE”;
$col[“formatter”] = “date”; // Formatear como fecha
$col[“formatoptions”] = array(“srcformat” => “Y-m-d”, “newformat” => “d/m/Y”); // Mostrar formato día/mes/año
$col[“width”] = “80”;
$col[“editable”] = false;
$cols[] = $col;

it is the same.

Abu Ghufran Staff answered 6 days ago

Just to log solution: I verified your code and it should work after fixing it to exact (equal) match:

$col["searchoptions"]["sopt"] = array("eq");
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

3 + 5 =

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?