column.search for numerical range
column.search for numerical range
Hello,
I am new to datatables and am struggling on finding how to filter a column by a numerical range.
https://datatables.net/reference/api/column().search()
I have a column with pure numbers.
1
2
5
7
10
200
241
..etc
I have a filter textbox that a user can put a minimum amount, say 8. If 8 was answered i would want only rows with >= 8 to appear.
Filtering text works great with column.search(val ? '^' + val + '$' : '', true, false).draw(); However, i can't get the numerical >= to work.
Any help would be appreciated.
Thank you!
This question has an accepted answers - jump to answer
Answers
Hi,
If you want to do a range filter, you currently need to use a custom filter as shown in this example.
Allan
That was exactly what i needed. Thank you!