Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have designed a jquery DATA-TABLE and binded my data from database everything works cool & awesome .

Now i been stuck , where the thing is i have two columns in my data table startdate and enddata . so i need to provide some filter with date-time pickers or whatever best fits the scenario to filter the rows between selected dates..

I am not sure how this can be done ? Can we perform operations on DataTable Data like we are doing for searching option on DataTable ?

Else do i need to fetch a different set of data on my selection every-time and bind to Data-table ? which i am thinking at present alternative .

Any workaround is appreciated .

Thanks & Regards
Posted

1 solution

Here is an example that you should be able to use.

http://jquery-datatables-column-filter.googlecode.com/svn/trunk/dateRange.html[^]
 
Share this answer
 
Comments
sunil gutta 9-Apr-14 3:37am    
yes i been through that i need some advice how to attach the COLUMNFILTER to my code which is
$(document).Ready(function(
$('#tableid').datatable({//written some content}).edittable({//written something for editing i.e sUpdateURL etc });
});
}); .. In this where i neeed to attach .COLUMNFILTER() ? ? ?
REGARDS
Guruprasad.K.Basavaraju 9-Apr-14 12:37pm    
is this not what you are looking for ?

$(document).ready(function(){
$('#example').dataTable()
.columnFilter({ sPlaceHolder: "head:before",
aoColumns: [ { type: "text" },
{ type: "date-range" },
{ type: "date-range" }
]

});
});
sunil gutta 9-Apr-14 12:46pm    
yes this in excat but if i keep the above code where should i keep my EDITTABLE which i placed after $('#example').dataTable().editTable({}) ?? ? i need edit & column filter mate . any suggestion
**In excat i trying to develop a datatable with editable with filters too
Guruprasad.K.Basavaraju 9-Apr-14 13:12pm    
Sunil..

apply both to the Datatable..

like for instance..

var dt = $('#example').dataTable({..bla bla });
dt.edittable({..bla bla });

dt..columnFilter({ sPlaceHolder: "head:before",
aoColumns: [ { type: "text" },
{ type: "date-range" },
{ type: "date-range" }
]

});
sunil gutta 9-Apr-14 13:37pm    
+Thanks mate mentioned code looks cool . will try and get back to you later in that time i am working on this issue .
WELL similarly i posted one question on datatables . i hope ur expertise will prove handy in that case . the link here :http://www.codeproject.com/Questions/756815/Jquery-Data-Table-editing

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900