Hey guys,
I'm having an odd issue where date columns incorrectly parse ISO 8601 strings, as well as do not filter correctly. Setting a custom format, such as 'YYYY-MM-DD' parses the date correctly, and sorting works as expected. However, filtering remains broken. Can anyone point me to what I may be doing wrong here?
Dataset:
[
{
qty: 0,
reqDate: '2022-01-19T03:00:00.000Z',
promiseDate: '2022-01-19T03:00:00.000Z',
backlog: 32
},
{
qty: 0,
reqDate: '2022-04-08T03:00:00.000Z',
promiseDate: '2022-04-08T03:00:00.000Z',
backlog: 32
}
]
Output:
Source:
const grid = new Grid({
columns: [
{ text: 'Shipped', field: 'qty', flex: 1},
{ text: 'Backlog', field: 'backlog', flex: 1},
{ type: 'date', text: 'Req. Date', field: 'reqDate', flex: 1},
{ type: 'date', text: 'Promise Date', field: 'promiseDate', flex: 1},
],
features: {
cellEdit: false,
filter: true,
},
height: 400,
data: [] // set asyncronously via fetch
});