Torna al Thread
$(function () {
$.datepicker.regional[""].dateFormat = 'dd/mm/yy';
$.datepicker.setDefaults($.datepicker.regional['it']);
});
oTable = $('#dtElenco').dataTable({
"oLanguage": {
"sUrl": "/Metronic/plugins/data-tables/language/it-IT.txt"
},
"aoColumns": [
{ "bSortable": false },
{ "bSortable": false },
null,
null,
null,
null,
null,
null,
{ "bSortable": false }
],
"aaSorting": [[2, "desc"]],
"aLengthMenu": [
[20, 50, 100],
[20, 50, 100] // change per page values here
],
// set the initial value
"iDisplayLength": 20,
"sPaginationType": "bootstrap",
"aoColumnDefs": [
{ 'bSortable': false, 'aTargets': [0] },
{ "bSearchable": false, "aTargets": [0] }
],
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/Handler/ajaxTable.ashx",
"fnServerData": function (sSource, aoData, fnCallback) {
aoData.push({ "name": "type", "value": "centri" });
$.ajax({
"dataType": 'json',
"contentType": "application/json; charset=utf-8",
"type": "GET",
"url": sSource,
"data": aoData,
"success": function (msg) {
var json = jQuery.parseJSON(msg);
fnCallback(json);
$("#dtElenco").show();
},
error: function (xhr, textStatus, error) {
if (typeof console == "object") {
console.log(xhr.status + "," + xhr.responseText + "," + textStatus + "," + error);
}
}
});
},
})
.columnFilter({
//sPlaceHolder: "head:before",
"aoColumns": [
null,
null,
{ "type": "date-range", sRangeFormat: "{from} {to}" },
{ "type": "date-range", sRangeFormat: "{from} {to}" },
{ "type": "text" },
{ "type": "text" },
null,
{ type: "select", values: ['ON', 'SB', 'ATTESA ATTIVAZIONE', 'OFF'] },
null
]
});