How to create filters for date range

I had created and DTO screen and other UI screen. I am trying to add below dateField filter

  1. from date
  2. to date

I am trying to get range data between from date and to date on screen but no luck.
Date range must also be on basis of date excluding time.

Any help is appreciated.

Please provide some code and explain what doesn’t work.

Selection_355

From Above screen filters i want, from date and to date to work as range with other filters

For eg : if i enter :::: apac / card number = 12345, from date : 29-April-2022 , to date 2-may-2022
So i want to fetch apac / card number data between 29-April-2022 and 2-may-2022 as per date selected

-------Below is my controller-----------

public class SettlementLoanReportBrowse extends StandardLookup<SettlementLoanReport> { 
@Install(to = "settlementReportDl", target = Target.DATA_LOADER)
    private List<SettlementLoanReport> settlementReportDlLoadDelegate(LoadContext<SettlementLoanReport> loadContext) throws ParseException {
        String productGroupFilterValue = productGroupFilter.getValue() ==null ? "" : String.valueOf(productGroupFilter.getValue());
        String accountNoFilterValue = accountNoFilter.getValue();
        String statusFilterValue = statusFilter.getValue() ==null ? "" : String.valueOf(statusFilter.getValue());

        log.info("productGroupFilterValue:::::"+productGroupFilterValue);
        log.info("accountNoFilterValue:::::"+accountNoFilterValue);
        log.info("statusFilterValue:::::"+statusFilterValue);

        return settlementLoanReportService.loadFilterCases(productGroupFilterValue,accountNoFilterValue,statusFilterValue);
    }
}

Below is my service class

public List<SettlementLoanReport> loadFilterCases(String productGroup, String accountNo
           ,String statusFilterValue) {
       return fetchLoanReport().stream()
               .filter(reassign -> {

                      
                   return  (Strings.isNullOrEmpty(productGroup) || productGroup.equalsIgnoreCase(reassign.getProductGroup())) &&
                           (Strings.isNullOrEmpty(accountNo) || accountNo.equalsIgnoreCase(reassign.getAccountNo())) &&
                           (Strings.isNullOrEmpty(statusFilterValue) || statusFilterValue.equalsIgnoreCase(reassign.getCaseStatus()));


               })
               .collect(Collectors.toList());

   }

If you get data from a service with a certain set of parameters, I would recommend using simple input fields like TextField, DateField for entering filter conditions. Get their values in load delegate and pass to the service.