I've an issue with setting a date filter in the grid.
The date filter on a datetime column is manually set in the grid to the date 2018-03-21
The odatav4-adaptor translates it to this:
$filter=(createdOn gt 2018-03-20T23:59:59.000Z) and (createdOn lt 2018-03-21T23:59:59.000Z)
I think the second condition should be: (createdOn lt 2018-03-22T00:00:00.000Z)
Otherwise records created on 2018-03-21T23:59:59.000Z will be missing in the result.
But, another problem is that when I load exactly the same filter at startup from code:
ngOnInit(): void {
let filter = { isComplex: true, field: 'createdOn', operator: 'equal', value: new Date(2018, 3, 21), condition: 'and', predicates: [{ isComplex: false, field: 'createdOn', operator: 'greaterthan', value: new Date(2018, 3, 20), ignoreCase: false, anyCondition: '' }, { isComplex: false, field: 'createdOn', operator: 'lessthan', value: new Date(2018, 3, 22), ignoreCase: false, anyCondition: '' }] };
this.filtercolumns.push(filter);
}
Now the odatav4-adaptor translates it to this (which is different and wrong):
$filter=createdOn eq 2018-03-21T00:00:00.000Z
How to solve these two issue?