Form Builder/Search Kit: Date filters do not work when picking dates
When creating a Form Builder form based on a Search Kit, the "Receive Date" filter doesn't work if you use "Pick Date".
Steps to Replicate
- Create a SK that groups Contributions by Financial Type, and displays a count of IDs and a sum of Total Amount. Screenshot and exported SK are below.
- Embed the search in a Form Builder form, and add a "Date Received" filter. Screenshot and afform markup below.
- Use the form to filter by Date Received is This calendar year. Observe that it filters correctly.
- Change the Date Received to Choose Date Range and select 1/1/2022-12/31/2022 (or just 1/1/2022-today).
Expected Result
Same as filtering by "This calendar year".
Actual Result
Date filter is ignored.
Search Kit
[
{
"name": "SavedSearch_date_test",
"entity": "SavedSearch",
"cleanup": "unused",
"update": "unmodified",
"params": {
"version": 4,
"values": {
"name": "date_test",
"label": "date test",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "Contribution",
"api_params": {
"version": 4,
"select": [
"COUNT(id) AS COUNT_id",
"SUM(total_amount) AS SUM_total_amount"
],
"orderBy": [],
"where": [],
"groupBy": [
"financial_type_id"
],
"join": [],
"having": []
},
"expires_date": null,
"description": null
}
}
}
]
Form Builder
<div af-fieldset="">
<af-field name="receive_date" defn="{input_type: 'Select', search_range: true, input_attrs: {}}" />
<crm-search-display-table search-name="date_test" display-name=""></crm-search-display-table>
</div>