This is a migrated thread and some comments may be shown as answers.

Support of filterable operators (string, number, date) and date filtering

1 Answer 193 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dimitris
Top achievements
Rank 1
Veteran
Dimitris asked on 25 Nov 2020, 10:31 AM

In jQuery kendo grid we were able to set the default filters from filterable operators.
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/filterable.operators.date

With that we could set all the date filters search for a range from one date to another

I am trying to do the same from the directive (and not from the HTML, so please try to answer for that) with something like this:

 gridSettings: GridSettings = {
        state: {
            skip: 0,
            take: 10,
            // Initial filter descriptor
            filter: {
                logic: 'and',
                filters: []
            }
        },
        columnsConfig: [
 {
            field: 'publicationDate',
            title: this.translateService.instant('legislation.publication_date'),
            filterable: [{ operator: 'gte' }, { operator: 'lte' }],
            filter: 'date',
            format: '{0:dd/MM/yyyy}',
            type: 'date',
            hidden: false,
            width: 120
        }
...
I tried on  filterable of the column but I also tried on the general  filter: { filters: [ ... ] } without success.

1) Does Angular KendoGrid support this to set the default criteria for the filters for each column or type like jQuery filterable operators (string, number, date) ?

 

2) And a second question regarding this european format I am using for the dates on my date columns. When I apply a filter like I am doing in the attached screenshot, it's not working

1 Answer, 1 is accepted

Sort by
0
Dimitris
Top achievements
Rank 1
Veteran
answered on 25 Nov 2020, 10:39 AM
And please DON't just give me this as an answer:
https://www.telerik.com/kendo-angular-ui/components/grid/filtering/built-in-template/#toc-hiding-row-filter-operators

I need to set the operators inside the component since I am not using the HTML  <kendo-grid-column> because I need the grids to be persistent and I followed the second example from here:  https://www.telerik.com/kendo-angular-ui/components/grid/how-to/persist-state/ where the columns are configured from the component .
Tags
Grid
Asked by
Dimitris
Top achievements
Rank 1
Veteran
Answers by
Dimitris
Top achievements
Rank 1
Veteran
Share this question
or