Hi! I'm having trouble filtering dates with data grids. I don't know if I need to input the date in a specific format, but I'm doing the following:
I get a date similar to this: "2019-01-04 11:50:53." I'm using Excel filter, but when I open the filter popup, it looks like it's loading. I try removing the column formatting and the popup displays correctly, but when I apply the filter, the data isn't displayed. Here is an example similar to the code I am applying:
Hi Angel Peraza,
Greetings from Syncfusion support.
App.vue // Convert date strings to Date objects const parsedData = gridData.map(item => ({ ...item, created_at: new Date(item.created_at), test_date: new Date(item.test_date), })); |
If you need any other assistance or have addition questions, please feel free to reach out us.
Regards,
Aishwarya R
Thanks for your reply, I just have one more question.
We have a very large data set, and I was wondering if parsing the field of the entire data set would be the best option.
Hi Angel Peraza,
We acknowledge your concern regarding the parsing of a very large dataset and its effect on performance.
Regards,
Aishwarya R
Sure! We use Laravel PHP to manage our backend and receive data from the database using a stored procedure. So, we get something like this on our frontend:
{
"result": [
{
"hash": "*******",
"score": null,
"created_at": "2019-01-04 11:50:53",
},
{
"hash": "********",
"score": null,
"created_at": "2019-01-14 10:41:04",
},
{
"hash": "*********",
"score": null,
"created_at": "2019-01-14 16:13:16"
},
]
}
We were looking to filter by the date field but we have that Issue
Hi Angel Peraza,
Thank you for providing the details about your setup.
Based on the information shared, it has been observed that you are using local data binding in the Syncfusion Grid with date strings retrieved from a Laravel PHP backend via a stored procedure. To enable proper filtering for date-type columns in the Grid, it is necessary to convert the date strings into JavaScript Date objects before binding the data to the Grid. This ensures that filtering and other data operations work correctly. We understand your concern regarding the performance impact of handling large datasets. However, this conversion remains essential for the Grid to interpret and process date values correctly.
Regards,
Aishwarya R
@stickman hook, this problem sounds be the same with yours. Can you give him some your experience?