I would like to create a custom filter for a kendo ui grid with the following requirements:
- The column is a date.
- There are other filterable columns that are not necessarily dates.
- The filter dropdown should not be unnecessarily complex. There should be a startDate, endDate, filter, and clear buttons. No other dropdowns (no "and", "greater than", "less than", etc).
- The filter should be in a dropdown menu from the column and not a separate row.
- The dataSource is a JSON object.
- The date in the JSON object is in this format: "2022-04-12T00:00:00".
- When the user clicks the clear button in the dropdown and then tries to filter again it should still work as expected.
I tried following this Dojo: https://dojo.telerik.com/EVEwuREK but it only got me part way there as I do not know how to override the filter button and include the filters from the other columns. In this example, there is no submit or clear button so if the user enters dates they can't bet back to the full list and if they filter by column that filter gets cleared when filtering by date. It also produces unexpected results depending on whether you filter by country or date first.
I made a sample Dojo here which shows the bug with filtering: Dojo
Steps to Reproduce:
- Go to the Dojo and click run.
- Click the birthday filter.
- Choose 1/1/1980 - 1/1/1989 and click filter
- Observe that the correct entry is displayed.
- Click the filter on the birthday field again.
- Click Clear (observe that all 3 records are now shown as expected)
- Click the birthday filter again.
- Choose the same dates as before 1/1/1980 - 1/1/1989 and click filter.
- Notice this time 2 records are showing and neither fall inside that date range.