Hi Edson,
Thanks for sharing the details.
Query – 1: “When there is not matching, the table shows nothing, the problem is although there is matching data the table shows nothing once I add the calendar type.”
We checked this query and would like to let you know that for initial filtering of date values, you need to provide the value as in the same format that is bound to the Grid’s dataSource. For e.g., Consider the date value – “1996-07-04T10:10:00.000Z” is present in the Grid data source for which the column format is set as “ddMMyyyy”. So for initial filtering you need to provide this date value so as to filter it.
|
this.filterSettings = {
ignoreAccent: true,
type: "Excel",
columns: [{ field: 'OrderDate', matchCase: false, operator: 'equal', predicate: 'or', value: "1996-07-04T10:10:00.000Z" }]
} |
We have prepared a sample based on this for your reference which you can find below,
So please make sure to provide the date value in the same format as present in the underlying data source for the initial filtering.
Query -2 : “Whether I define the column of type date or with the Menu filter, the problem is that i can’t set the date format and the table stops showing data when I add the format. I also tried to create another table without the preset value and the same problem happens.”
We could not reproduce this problem with the format that you have mentioned in your shared code snippet – “ddMMyyyy”. Please check below sample for reference,
Could you please check and let us know if you are able to reproduce your problem scenario in the above shared sample. If not then please share us a sample date value that is bound in the Grid’s data source and let us know if the problem is reproduced with this format – “ddMMyyyy” or any other format. If you have used custom date format then we suggest you to set it using the columns format property as demonstrated in the below code snippet,
|
<e-column field='OrderDate' [format]='formatOptions' headerText='Order Date' textAlign='Right' width=120></e-column>
export class AppComponent implements OnInit {
public formatOptions: object;
ngOnInit(): void {
this.formatOptions = { type: 'date', format: 'dd/MM/yyyy' };
}
} |
More details on this can be checked in the below help documentation link,
Let us know if you have any concerns.
Regards,
Sujith R