Is it possible to have both the sort when clicking on the column header and the checkbox filter for dates? The problem I'm having is that I want to format the date, at the moment I do that when I'm getting the data from the API and before passing it to the Grid component.
API date:
2022-06-23T00:46:53.8066667Z
Which gets formatted to:
23-06-2022
Because the date is already formatted, this works for displaying the correct formatted date in the grid and in the checkbox filter, and then filtering on the dates as well
<GridColumn
field={columnField}
title={'Modified'}
columnMenu={(props) => ColumnFilterSearchMenu(rowData, props)}
/>
However, because the date is formatted and turned into a string, this breaks the sorting functionality. As you can see below the table column seems to be sorted on the first number (the day) rather than the entire date.
Is there a way to have both functionalities?
I've created a quick sandbox env where you can see the issue as well: https://codesandbox.io/s/still-water-186lbh?file=/src/index.js