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

Custom function filter #61

Closed
robov opened this issue Jul 22, 2014 · 1 comment
Closed

Custom function filter #61

robov opened this issue Jul 22, 2014 · 1 comment

Comments

@robov
Copy link

robov commented Jul 22, 2014

Excellent, thank you daniel_r. Looks like an amazing plugin. Can I suggest to include an extra filter based on dates (show only from today, show only this week, show only this month, show only last 3 months, show only this year

Your response for your reference:
I can enhance the range_date, you will have to provide array of objects "[{vale: 1, label: Today}, {vale: 2, label: Last week}, ... etc] and custom function that will accept two parameters (type, date_val) where the type will be one of the values from the array of obj and the date_val will be one of the date in the relevant column - this "custom function" will be executed for each row in table and the date_val will be tested against that function which in turn will return true / falsem so instead of tow date inputs you will have a select menu with values from that array of objects you provide yourself and each time you select a value from the select your "custom function" will be executed for each row (for relevant column),

Actually it wont be an enhancement of range_date , instead it will be a new filter type that will allow the use of custom filtering function (will be good for date and any other type of inputs too)

@vedmack vedmack changed the title This Week Filter Custom function filter Aug 7, 2014
vedmack added a commit that referenced this issue Aug 10, 2014
@vedmack
Copy link
Owner

vedmack commented Aug 10, 2014

Perfection takes time... :)
Done. see updated showcase and scroll down to see the example code (write your custom function the way you want...)
http://yadcf-showcase.appspot.com/DOM_source.html

Grab 0.8.3.beta.3 from https://github.com/vedmack/yadcf/tree/master/lab

Will update docs in the upcoming days (hopefully)...

@vedmack vedmack closed this as completed Aug 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants