{"action":"closed","issue":{"url":"https://api.github.com/repos/SitePen/dgrid/issues/1265","repository_url":"https://api.github.com/repos/SitePen/dgrid","labels_url":"https://api.github.com/repos/SitePen/dgrid/issues/1265/labels{/name}","comments_url":"https://api.github.com/repos/SitePen/dgrid/issues/1265/comments","events_url":"https://api.github.com/repos/SitePen/dgrid/issues/1265/events","html_url":"https://github.com/SitePen/dgrid/issues/1265","id":144812287,"number":1265,"title":"dgrid dstore collection - “or” filter not working as expected ?","user":{"login":"storecat","id":8729486,"avatar_url":"https://avatars.githubusercontent.com/u/8729486?v=3","gravatar_id":"","url":"https://api.github.com/users/storecat","html_url":"https://github.com/storecat","followers_url":"https://api.github.com/users/storecat/followers","following_url":"https://api.github.com/users/storecat/following{/other_user}","gists_url":"https://api.github.com/users/storecat/gists{/gist_id}","starred_url":"https://api.github.com/users/storecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storecat/subscriptions","organizations_url":"https://api.github.com/users/storecat/orgs","repos_url":"https://api.github.com/users/storecat/repos","events_url":"https://api.github.com/users/storecat/events{/privacy}","received_events_url":"https://api.github.com/users/storecat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-31T07:23:10Z","updated_at":"2016-03-31T22:46:48Z","closed_at":"2016-03-31T22:46:48Z","body":"I'm working with Dojo dgrid and I have problem with dstore filtering with using \"**or**\" statement.\r\n\r\n```\r\nvar today = new Date();\r\ntoday.setHours(0,0,0,0);\r\n\r\nvar start_date= new Date();\r\nstart_date.setDate(today.getDate() - 5);\r\nstart_date.setHours(0,0,0,0); \r\n\r\ngrid.set('collection', store.filter(\r\n    new store.Filter().or(\r\n            new store.Filter().gte('datefield1', start_date).lte('datefield1',today),\r\n            new store.Filter().gte('datefield2', start_date).lte('datefield2',today)\r\n    )\r\n)); \r\n```\r\nBoth conditions works perfect when they are separatelly, but when I put them together into \"or\" filter it works like \"and\" statement: both have to be \"true\" to return values.\r\n\r\nHow to make \"or\" statement to work properly in dojo dgrid dstore?"}}