Author Topic: Using a "Between" filter on a date column does not work  (Read 2097 times)

orlando_acevedo

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 27
    • View Profile
Using a "Between" filter on a date column does not work
« on: December 08, 2018, 02:22:08 am »
Hello pqTeam,

After upgrading an "Infinite scrolling" grid to v5.6, the "between" filter on a date column is not working anymore if using the header filter textboxes.
The problem is that when entering the "to" date on the filter's right textbox, the filter changes to a "gte" condition using that date.

It appears to be working fine for non "Infinite scrolling" grids.

The filtering works if I use the filter menu instead of the textboxes.

Thank you,

OA.
« Last Edit: December 08, 2018, 02:24:32 am by orlando_acevedo »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6260
    • View Profile
Re: Using a "Between" filter on a date column does not work
« Reply #1 on: December 10, 2018, 11:58:49 am »
Between condition works fine in remote header filtering (v5.6):

https://paramquery.com/pro/demos/filter_header

It's changed to "gte" when only "from" textbox is entered.

It's changed to "lte" when only "to" textbox is entered.

This works same for "Infinite scrolling" grids.

orlando_acevedo

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Using a "Between" filter on a date column does not work
« Reply #2 on: December 11, 2018, 10:25:00 pm »
When any value is entered in any of the textboxes, no matter if the other textbox already has a date, it changes to gte.
The only way to make it work is to open the filter menu and enter the dates there.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6260
    • View Profile
Re: Using a "Between" filter on a date column does not work
« Reply #3 on: December 11, 2018, 10:44:29 pm »
As you haven't shared your code, so I'm making few assumptions.

you may face this issue if you have copied filter listener from infinite scrolling demo "verbatim".

Please either correct column.filter.listener so as to pass both value and value2 in call to filter method.

or remove column.filter.listener completely, grid would take care itself.