Hi Saravanan,
The Advanced Date Picker cannot directly replace the Data Grid 2 Date Filter. Data Grid 2 filter widgets have specific integration with the grid datasource and filtering mechanism, so a normal date picker does not automatically act as a grid filter.
A possible workaround is to place the Advanced Date Picker outside the grid and bind it to a helper object/date attribute. Then use that value as part of the Data Grid 2 datasource filtering logic, for example through a microflow datasource. The downside is that you would need to handle refreshing/reloading the grid when the date changes.
Another option, if the main requirement is UI consistency, would be to customize the styling of the standard Data Grid 2 Date Filter so that it visually matches the Advanced Date Picker as closely as possible.
So in short, direct replacement is not supported, but using a helper date attribute with custom datasource filtering would be the closest workaround.
I hope this helps
Hi Saravanan,
The standard Date Filter in Data Grid 2 cannot be directly replaced with the Advanced Date Picker because they serve different purposes. The Date Filter integrates with Data Grid 2's built-in filtering mechanism, whereas the Advanced Date Picker is a date-selection widget.
You have two practical options:
Option 1: Use the Advanced Date Picker with a custom filtering flow
If you want to maintain the same date-selection UI across your application:
For this approach, a microflow-based Data Grid 2 data source can retrieve records based on the selected dates. You will need to implement the filtering logic yourself rather than relying on the standard Date Filter.
Option 2: Create a custom Data Grid 2 filter widget
If you want the Advanced Date Picker to behave exactly like the built-in Date Filter—including integrating with Data Grid 2's filtering and refresh behavior—you would need a custom widget that implements the appropriate Data Grid 2 filter integration.
My recommendation: Start with Option 1 if you want to reuse the Advanced Date Picker without developing a custom widget. If you need to preserve all the standard Data Grid 2 filtering behavior, investigate Option 2.
The key point is that changing the date-picker UI alone will not automatically connect it to Data Grid 2's filtering mechanism.
For reference:
Hope this helps.
Hi Saravanan,
As per you ask here is the solution I would sugget,
1. Can the default Date Filter in a Data Grid 2 column be replaced with the Advanced Date Picker?
Not directly. Data Grid 2 filters out of the box only with its own filter widgets (Text, Number, Date and Drop-down filter from Data Widgets). The Advanced Date Picker isn’t connected to the grid’s filtering, so dropping it into the column header won’t filter anything by itself.
You can still get the same result with a workaround. The Advanced Date Picker captures the date on a helper object, and the grid’s data source filters the records based on that value.
2. How to set it up
Step 1 – Create a helper entity
Create a non-persistent entity, e.g. HelperEntity, with two attributes:
StartDate (Date and time)EndDate (Date and time), only needed if you want range filteringStep 2 – Wrap the grid in a data view with the helper object
DS_CreateDatePickerHelper) that creates and returns a new HelperEntity object.DS_GetDepartmentObject) that takes HelperEntity as its parameter.test4 column), place the Advanced Date Picker instead.Step 3 – Configure the Advanced Date Picker
On the General tab:
HelperEntity/StartDate (plus EndDate for a range)Step 4 – Add an On change event to refresh the grid
On the Events tab, set On change to call a microflow (e.g. OCH_RefreshData). The microflow takes HelperEntity as a parameter and has a single Change object activity on it with Refresh in client = Yes and no member changes. Refreshing the helper object makes the grid’s microflow data source run again with the newly selected date.
Step 5 – Filter the records in the data source microflow
In DS_GetDepartmentObject:
DepartmentMaster objects from the database.$HelperEntity/StartDate != empty.The filter expression compares only the date part, ignoring time:
parseDateTime(formatDateTime($currentObject/test4, 'dd/MM/yyyy 00:00:00.000'), 'dd/MM/yyyy 00:00:00.000') = parseDateTime(formatDateTime($HelperEntity/StartDate, 'dd/MM/yyyy 00:00:00.000'), 'dd/MM/yyyy 00:00:00.000')
A simpler equivalent uses trimToDays:
trimToDays($currentObject/test4) = trimToDays($HelperEntity/StartDate)
For a date range (Selection type = Range):
$currentObject/test4 >= trimToDays($HelperEntity/StartDate) and $currentObject/test4 < addDays(trimToDays($HelperEntity/EndDate), 1)
Things to keep in mind
[test4 >= $StartOfDay and test4 < $EndOfDay], so the database does the filtering.StartDate and EndDate and refreshes the helper, so all records show again.Hope this helps. If you have any doubt on this process, feel free to connect.
If this solution works for you, kindly mark it as the accepted answer so it can help others facing the same issue.