I'm trying to add a custom html header to my datatable, in particular I want change the search and lenght position to the left, and add the custom html
to the right, I try this code:
$(document).ready(function() {
var table = $('#example').DataTable( {
"dom": 'l<"toolbar">frtip'
} );
$("div.toolbar").html('<div class="float-right">'+
'<form class="form-inline">' +
'<div class= "form-group" > ' +
'<div class="input-group">' +
'<input type="text" class="form-control form-control-light" id="dash-daterange">' +
'<div class="input-group-append">' +
'<span class="input-group-text bg-primary border-primary text-white">' +
'<i class="mdi mdi-calendar-range font-13"></i>' +
'</span>' +
'</div >' +
'</div >' +
'</div >' +
'<a class="btn btn-primary ml-2">' +
'<i class="mdi mdi-filter-variant"></i>' +
'</a>'+
'</form>' +
'</div>');
} );
I add a JSFiddle here.
What I did wrong?
UPDATE
Expected result:
Show [10 v] entries calendar[] filter[]
Search...