0

我正在使用数据表列过滤器插件:

It has default date filter as this format:-24/07/2012
But I have to filter the data in this format:-24-07-2012..??
4

1 回答 1

0

您可以设置自己的渲染器

aoColumns日期列中添加自定义渲染回调,例如(未经测试):

fnRender: function (oObj) {
    var oDate = new Date(oObj.aData[0]);
    return '<div class="date">' + oDate.getDate() + '-' + oDate.getMonth() + '-' + oDate.getFullYear() + '<div>';
}

另请参阅此示例

于 2012-07-24T07:36:07.980 回答