Base solution for your next web application
Open Closed

Advanced filter datetime filter issue when the dates are cleared. #8643


User avatar
0
adamphones created

When advanced filter section is used to filter grid by any date time filter(min, max etc) then the filters are cleared to hit search or enter the client side throws exception as 'The parameter 'minDateFromFilter' cannot be null.'.

I think the date should be set to undefined when cleared instead as the generated 'service-proxies.ts' checks for dates against null and throws the exception.

Reproduce step:

1- Use RAD tool to generate an Entity (make sure to select filters by a property that type is date) 2- Once the pages are created go the list of entities 3- Expend the 'Advanced filters' on the page 4- Filter by a date property and hit the enter. 5- Remove the date field and hit the enter

Now you will see a spinner on the page and when you view the F12 you will see the error on the console that shows you that the date is null.


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi adamphones

    Is this related to https://support.aspnetzero.com/QA/Questions/8409?

  • User Avatar
    0
    adamphones created

    Yes indeed! Should we wait for the solution or we can do something about this?

  • User Avatar
    0
    maliming created
    Support Team

    hi adamphones

    You can try SwaggerNullableParameterFilter

    https://support.aspnetzero.com/QA/Questions/8409#answer-060f9518-4b8e-4466-106f-39f33043c792