Use another search box other than the default Datatables

Asked

Viewed 30 times

0

Hello, what to know if it is possible to use a search box that I do by hand and add my table that has Datatable without affecting the plug-in. Why an example I was thinking of filtering for a date input. Starting now!

1 answer

0


I managed to solve my problem: we put it in the style:

    <style>
    .dataTables_filter { 
        display: none; 
    }
</style>

My js

 $("#filter-input").keyup(function() {
     var pesquisar = $(this).val();
     tabela.search(pesquisar).draw();
     });
  });

And in the Datatable settings have let:

"searching": true

Browser other questions tagged

You are not signed in. Login or sign up in order to post.