【发布时间】:2011-12-01 13:01:47
【问题描述】:
我使用 jqGrid,我的网格定义是这样的:
...
colNames:['Type','Date','Message','User Name','Host'],
colModel:[{name:'type',index:'type', width:100},
{name:'date',index:'date', sorttype:'date', formatter:'date',
formatoptions: {newformat:'d-M-Y'}, width:100},
{name:'log',index:'log', width:200},
{name:'username',index:'username', width:50},
{name:'host',index:'host', width:50}],
...
当我调试即将到来的数据时,其中一个日期值(它是数字)如下:
1322550786997
网格是这样显示的:
29-Nov-2011
到目前为止一切正常。但是,当我想对日期列进行排序时,它不会改变任何内容。
有什么想法吗?
【问题讨论】:
-
哪种数据类型有 1322550786997?是
String还是Number?