How to add filter condition of maximum days between from date and to date

Hi,

I have created a UI filter of date range from the front-end as below:

image
image
image

But, I don’t have any option to set the interval between the from date and to date. For example: The selected date range should not exceed 30 days. Kindly suggest what can be done to achieve this.

Also, I tried creating the same filter from the xml file as below:

<filter id="filter"
                dataLoader="reportCollPanVerificationsDl">
            <properties include=".*"/>
            <configurations >
                <configuration id="propertyConfiguration"
                               default="true" name="default">
                    <propertyFilter property="createdDate" caption="from Date"
                                    operation="GREATER_OR_EQUAL" operationCaptionVisible="true"
                                    operationEditable="true"/>
                    <propertyFilter property="createdDate" caption="To Date"
                                    operation="LESS_OR_EQUAL"  operationCaptionVisible="true"
                                    operationEditable="true"/>
                </configuration>
            </configurations>

        </filter>

But, I cannot add other search conditions after this. The “Add search condition” button is in freeze mode.
image

Jmix version: 1.5.0
Jmix Studio plugin version: 2.0.0-231

You cannot achieve this with genericFilter component. It doesn’t support complex validation of parameter values.

Use custom filter as explained in UI Samples Cookbook.