0
我使用數據表列過濾器插件: -如何更改datatables columfilter插件(日期篩選器)中的日期formet?
It has default date filter as this format:-24/07/2012
But I have to filter the data in this format:-24-07-2012..??
我使用數據表列過濾器插件: -如何更改datatables columfilter插件(日期篩選器)中的日期formet?
It has default date filter as this format:-24/07/2012
But I have to filter the data in this format:-24-07-2012..??
您可以設置own renderer:
在日期列aoColumns
添加自定義呈現回調,例如(未經測試):
fnRender: function (oObj) {
var oDate = new Date(oObj.aData[0]);
return '<div class="date">' + oDate.getDate() + '-' + oDate.getMonth() + '-' + oDate.getFullYear() + '<div>';
}
另見this example。