To make filters in the table I recommend you use queryParams .
This option allows you to send the start date and end date to your php driver called sales_data. to then perform said filter in your sql query, thus returning a bounded json
You can see the documentation Here .
$('#id_tabla').bootstrapTable({
method: 'post',
url: 'consulta_ejemplo.php',
queryParams: function (p) {
return {
filtro_fecha_inicio: $('#datoFechaIni').val(),
filtro_fecha_fin: $('#datoFechaFin').val()
},
formatNoMatches: function () {
return "No existen datos";
},
dataType: 'json',
cache: false,
striped: true,
pagination: true,
pageSize: 10,
pageList: [10, 25, 50, 100, 200],
search: true,
showColumns: false,
showRefresh: true,
clickToSelect: false,
showPaginationSwitch: true,
columns: [ {
field: 'Id',
title: 'ID',
align: 'left',
sortable: true,
visible: true
},{
field: 'Nombre',
title: 'Titulo',
align: 'left',
sortable: true,
}]
});