Jquery数据表日期时间升序或降序

时间:2017-05-23 10:26:32

标签: jquery datatables

Jquery dataTable代码 {' bSortable':date-uk,' aTargets':[2]},//此行不适用于dateTime升序或降序

       $(document).ready(function () {
        $('#pendingLeaveDataTable').dataTable({
            "aaSorting": [],
            "aoColumns": [`enter code here`
                    { sWidth: '20%' },
                    { sWidth: '15%' },
                    { sWidth: '15%' },
                    { sWidth: '10%' },
                    { sWidth: '10%' },
                    { sWidth: '10%' },
                    { sWidth: '10%' },
                    { sWidth: '10%' },
                    { sWidth: '10%' }, ],
            "aoColumnDefs": [
                { 'bSortable': false, 'aTargets': [0] },
                { 'bSortable': false, 'aTargets': [0] },
                { 'bSortable': false, 'aTargets': [6] },
                { 'bSortable': false, 'aTargets': [7] },
                { 'bSortable': false, 'aTargets': [8] },
                { 'bSortable': date-uk, 'aTargets': [2] },// this line not working for dateTime ascending or descending
               // { "type": "date-uk", targets: 3 }

            ]
        });
    });

0 个答案:

没有答案