Data grid initial filters by date

Date filtering on data grid

Weweb documentation mentions that you can filter dates in the data grid by “greaterThanOrEqual” I am trying to set this up currrently in my data grid however despite weweb AI building the filter for me I am unable to get the desired outcome. The logs are showing that the filter defaults back to “equals”.

I am after some assistance for this particular issue and have not been able to resolve this.

Hi Ryan, welcome to the community :waving_hand:

I did some investigation on my own and indeed, it seems the filters “greaterThanOrEqual” and “lessThanOrEqual” are not applying. As they don’t apply correctly the filter ends up setting in the last filter used, in your case is the “equal” one.


Other filters like “greaterThan” and “lessThan” are working normally.
You can read more about how to create and use filters here

I’m going to submit this bug report internally.
I’ll keep you updated

Hi @Ryansj here is a solution for you pending when the issue is resolved by the team. Summmary of the solution is you will use formulaJS to do the greaterThanOrEqualTo using weweb npm plugin. Very easy just follow the steps

  1. Click on the plugins and add formulaJs (set it up exactly like you see in the below)
  2. Now you will have a new formula under NPM called formulajs it is basically all of the EXCEL formulas, and thankfully one of them is gte which is what you need. So you set it up as gte( datevalue(your first date) , datevalue(your second date) ) that’s it

Above is how you setup formulaJS so you can get all the EXCEL formula (very useful when working with cells and tables)

What your formula might look like when you set it up. Again you can ask AI to help with anything unclear. But this will get you moving along.

Cheers

1 Like

Thank you AgentD, I will give this a try.