query builder filtering dates

Hello,

I am using querybuilder with datagrid, but I am having problems to filter type date. I got the data from my API like that: "2019-10-21T00:00:00-03:00" and I realize that for the filter of querybuilder works I need to transform every date, like this:

for (let i = 0; i < this.contratos.length; i++) {
if (this.contratos[i].dataInicio != null) {
this.contratos[i].dataInicio = new Date(this.contratos[i].dataInicio);
}
}

But, on grid, I don't need transform the date like this, to sort the column, for example. There's some another way to do that?

Ps. My column on querybuilder:

<e-column field="dataInicio" label="Data início" type="date" format="dd/MM/yyyy"></e-column>

Thank you

3 Replies 1 reply marked as answer

MK Mohan Kumar Ramasamy Syncfusion Team July 20, 2020 03:13 PM UTC

Hi Rafael, 
 
We would like to let you know in Query Builder, the datasource will not be processed. So, we couldn’t able to change the date type values. However, in grid they have changed the date type values when bound to Grid. So, we suggest change the date type values before bind the datasource to query builder as you did in your sample. 
 
Please let us know, if you need any further assistance, 
 
Regards, 
Mohankumar R 


Marked as answer

RA Rafael July 21, 2020 02:04 AM UTC

Hello Mohan,

Oh, I understand.

Thank you very much


MK Mohan Kumar Ramasamy Syncfusion Team July 21, 2020 01:03 PM UTC

Hi Rafael, 
 
Thanks for the update.  
 
We are happy to hear that your issue has been resolved. Please feel free to contact us if you need any further assistance on this. 
 
Regards, 
Mohankumar R 


Loader.
Up arrow icon