Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search date range failed #2005

Open
EruditePig opened this issue Apr 29, 2021 · 0 comments
Open

search date range failed #2005

EruditePig opened this issue Apr 29, 2021 · 0 comments
Labels
Bug This needs fixing Reproducer: Present This PR or issue contains code, which reproduce the problem described or clearly understandable MCVE

Comments

@EruditePig
Copy link

Short description
w2ui.myGrid.search records between dates fail

What is current behavior

http://jsfiddle.net/EruditePig/vd1jhcn0/23/

  1. click Draw Grid Btn
  2. click Click me Btn, expect record1 should remain in grid, but now all records gone

What is desired behavior
...

Link to jsfidle/codepan with sample code

https://jsfiddle.net/EruditePig/mr5h13kg/17/

i modify the search function in w2ui.js,in the jsfidle above, the w2ui js is linked to my github fork repo.

what i modify is add check if there is 'operator' defined in search data, if any , use the user defined operator

search: function()
...
                    if (!'operator' in data){  // I add this if
                        if (typeof data.value == 'number') data.operator = 'is';
                        if (typeof data.value == 'string') data.operator = this.textSearch;
                        if ($.isArray(data.value)) data.operator = 'in'
                    }

Steps to reproduce or sample
...

@mpf82 mpf82 added Bug This needs fixing Reproducer: Present This PR or issue contains code, which reproduce the problem described or clearly understandable MCVE labels May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This needs fixing Reproducer: Present This PR or issue contains code, which reproduce the problem described or clearly understandable MCVE
Projects
None yet
Development

No branches or pull requests

2 participants