在JqGrid显示日期时间../日期(1352658600000)/

use*_*641 2 jqgrid asp.net-mvc-3

/Date(1352658600000)/ 
Run Code Online (Sandbox Code Playgroud)

显示日期时日期未以正确格式显示.

如何转换为正确的Format(dd/mm/yyyy)

tpe*_*zek 6

转换所需的只是date在jqGrid colum模型中设置formatter:

$('#gridId').jqGrid({
    ...
    colModel: [
        ...
        { name: 'Column Name', index: 'Column Index', ..., formatter: "date", formatoptions: { newformat: "m/d/Y"} },
        ...
    ],
    ...
});
Run Code Online (Sandbox Code Playgroud)

对于newformat选项,jqGrid支持PHP日期格式.