Bha*_*ani 3 javascript jquery jquery-ui jqgrid
我正在使用jqGrid在用户界面中显示记录,并且我想对日期列进行排序。它以 的形式返回我的日期Sat, Sep 1, 01:41 AM。我怎样才能用 jqGrid 做到这一点?
我对该专栏的 Colmodel 是:
{name:'transactiontime', index:'transactiontime', sorttype:'text', align:"right"},
Run Code Online (Sandbox Code Playgroud)
尝试以下操作formatoptions:
{name: 'transactiontime', sorttype: 'date', align: "right", formatter: 'date',
formatoptions: {srcformat: 'ISO8601Long', newformat: 'D, M d, H:i A'}}
Run Code Online (Sandbox Code Playgroud)
这srcformat可能取决于数据的输入格式。