Hi
When filtering dates in the column header, an error occurs, when debugging SQL the query is done with ilke
Hi
When filtering dates in the column header, an error occurs, when debugging SQL the query is done with ilke
Hello @NOLO ,
Can you please give a bit more information about the field? Is that autogenerated from the date field type or you are adding explicitly a field type date?
Regards
Johnny
This is my table
CREATE TABLE IF NOT EXISTS public.encuesta
(
encuesta_id integer NOT NULL DEFAULT nextval(âencuesta_encuesta_id_seqâ::regclass),
tipo_encuesta_id integer,
subtipo_encuesta_id integer,
cobertura_id integer,
levantamiento_id integer,
confianza_error_id integer,
tecnica_id integer,
diseno_muestra_id integer,
nota_tecnica text COLLATE pg_catalog.âdefaultâ,
puntos numeric(8,0),
cuestionarios numeric(10,0),
fecha_inicio date,
fecha_fin date,
responsable_id integer,
origen_id integer,
usuario integer,
entidad_id integer,
control_id integer);
$crud->setTable('encuesta');
$crud->FieldType('fecha_inicio','native_date');
$crud->FieldType('fecha_fin','native_date');
My date format is D/M/Y
Hello @NOLO ,
I can reproduce the issue locally. For now please use this work-around till this is fixed (I will keep you up to date on that):
if ($crud->getState() === 'Datagrid') {
$crud->fieldTypeSearchColumn('fecha_inicio', 'date');
$crud->fieldTypeSearchColumn('fecha_fin', 'date');
}
Hello @NOLO ,
I am glad to inform you that this is now fixed on latest version 3.2.5 . It was a small fix so I havenât include it on change logs. You can also enjoy our brand new function setCustomQuery but please keep in mind that currently it is not supporting sorting and search:
Let me know if this fixed the problem and also keep me up to date if there are any issues with the customQuery function ![]()
Thanks Johnny!
I will test this feature, since I have been using views, which have the id field as their âprimary key,â always the id field. They have been very useful to me since the setPrimarykey function does not work in views.
Thank you @NOLO ,
Keep in mind that search and ordering wonât work and I understand that this is maybe a deal-breaker for many people. On the other hand I am trying to make custom models to be easier to create for complicated queries. I would say setCustomQuery will mostly used on some reports (e.g. summaries⌠e.t.c.)
Works perfectly with postgreSQL views ![]()