我使用jqGrid在用户界面中显示记录,并希望对日期列进行排序。它以Sat, Sep 1, 01:41 AM的形式返回日期。我怎样才能用jqGrid做到这一点?
我对该专栏的Colmodel是:
{name:'transactiontime', index:'transactiontime', sorttype:'text', align:"right"},发布于 2012-09-18 04:15:13
尝试以下formatoptions
{name: 'transactiontime', sorttype: 'date', align: "right", formatter: 'date',
formatoptions: {srcformat: 'ISO8601Long', newformat: 'D, M d, H:i A'}}查看the demo,这是对the answer演示的简单修改。
srcformat可能取决于数据的输入格式。
https://stackoverflow.com/questions/12455337
复制相似问题