-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Custom date filter are not working anymore #247
Comments
It's hard to help you without any code provided. From that Custom Input Filter that I've done, the most important is the |
Thanks for your quick response.
What else can I check? I don't understand what it is supposed to do next |
oh I see you are making a Custom Date Filter with Flatpickr again? but why? Did you know that you can pass any of the Flatpickr options through the For a quick understanding on how the filtering works, every Filters must implement the So I'm not sure why you are trying to duplicate the Compound Date Filter, but I would say, you're probably over-complicating things. If the Compound Date Filter is missing an options or something that you cannot find through the |
Oh hell no, I didn't know... Indeed, I'm over-complicating things because I thought we couldn't have range mode with compoundDate, so I created a custom one :/ This morning I managed to reproduce the I found Flatpickr list options: https://github.com/flatpickr/flatpickr/blob/master/src/types/options.ts#L19 but I'm not sure all of these options are working with Is it possible to add a placeholder? If no, it's fine ;) Thanks you can close this |
Well actually I don't support any Filters with range yet, so how did you manage to do that? Can you share the code that you got? It's a bit funny because another guy ask for the same question in this issue #240 (numeric column by range) and I started last night a POC in PR #252. The main problem is that the FilterService uses Filter Conditions and those are expecting single value to compare. What I told that person is that the easiest to do this would be to duplicate the column and make 1 filter for the minimum and the other column/filter for the max value, I've done that several time.
Hmm I think for the most part yes, unless I override the setting in the Compound Date Filter!? I'm merging the options on this line, if an option doesn't work, we would have to troubleshoot.
Hmm from what I can see in the code, I only have the grid option Final note, I made a lot of Wikis but it doesn't have every use case, if you think that some of these Wikis could be updated, please do so, they are editable. |
I can share my code, but in my case I only need to get two dates and that's it. It means I don't use operators (I hid them). component.ts
When I pick two dates the Flatpickr closes and the callback is called, then I get my filter values...
|
I'm surprised that this works, I would expect a Filter Condition to kick in and complain that you're not passing a valid search value. However, the Filter Conditions are mapped through the field
I'll probably add that soon, it shouldn't be too hard to do since I've already done all the Editors. Just to be sure, you're looking into have a different ..."Juillet" Nice to see I'm not the only French speaking person which uses my lib 😉 |
Yes! That's what I want "Filtrer par date de commande" 👍 But don't worry, it's not a priority. Je suis français en effet mais je préfère que la doc soit en anglais, donc tant mieux ;) |
So I looked into the So you could already use it with the version you have installed, here's the code to use for the date picker filter filter: { model: Filters.compoundDate, placeholder: 'test placeholder' }` Here's a print screen of what that looks like for a bunch of Filters |
Yes it is working, perfect! 👍 |
@EfkanKnz Anyway, I created a new
hmmm actually I might rename and the result is the following (and that is actually with a |
Range Filters are now released under the new version 2.10.1 and a new Example 25 was created to showcase this new feature If you like the lib and you haven't already up vote, please do so.. ⭐️ 😸 |
Oh I didn't see your message! This is great, the result looks good. Operators |
I'm submitting a Bug report
My Environment
Context
Hello there,
Since I upgraded slickgrid to version 2.x, all of my custom date filters stopped to work :(
Current Behavior
There is no error, I just can't get the query from the filter. Also, it's working fine with the
Filters.compoundDate
, so I think it comes from the custom input filter.Code Sample
I declare my filter like this:
And the class I use is the same as your example:
https://github.com/ghiscoding/angular-slickgrid-bs4-demo/blob/master/src/app/examples/custom-inputFilter.ts
The text was updated successfully, but these errors were encountered: