How to implement date range picker with data grid?

3
How can I implement a date range picker (for example for a data grid)? I have a list of objects, each object has some date attribute, so I want to filter all objects created during the month, or during some other period that the user picks using a date range picker. I don’t want to use 2 date pickers, instead, I wanted to use this widget or something similar (https://marketplace.mendix.com/link/component/108122), but not sure how to configure it to make a data grid respond to the selection.      
asked
1 answers
0

You could create a query entity with the desired search fields and the mentioned widget, this servers as the input for the microflow that you run as the datasource for the nested datagrid. The datagrid has a datasource microflow and will get the query entity as the input parameter.

Then build your search logic around that to retrieve the correct objects based on the inputs from the query entity attributes and the dataview with the nested grid will show you the results as needed. Make sure to add a button to refresh the results on the query dataview and the query entity can be non-persistent.

So depending on the amount of search fields this will become more or less complex and one drawback is the fact that the sorting needs to be performed in the datasource microflow and no longer by the user.

Hope this provides you with some idea on how to get this working.

answered