为什么jqGrid可以';转换序列化的日期时间json?
嗨,为什么jqGrid可以';转换序列化的日期时间json?,json,jqgrid,datetime-format,jqgrid-asp.net,Json,Jqgrid,Datetime Format,Jqgrid Asp.net,嗨, jqGrid上没有datetime的Everythink完美无瑕:如何解决此转换问题?您可以在您的ColModel中尝试此方法 {name: 'colNmae', index: 'ColName', formatoptions: { srcformat: "ISO8601Long", newformat: "m/d/Y h:i A" }} 还是这个 {name: 'colNmae', index: 'ColName', sorttype: 'date', formatter: 'date
jqGrid上没有datetime的Everythink完美无瑕:如何解决此转换问题?您可以在您的ColModel中尝试此方法
{name: 'colNmae', index: 'ColName', formatoptions: { srcformat: "ISO8601Long", newformat: "m/d/Y h:i A" }}
还是这个
{name: 'colNmae', index: 'ColName', sorttype: 'date', formatter: 'date', datefmt: 'd-M-Y'},
您需要在colModel中将格式化程序设置为date,jqGrid将自动检测Microsoft日期格式 不需要设置srcformat,但可以设置newformat 试试这个:
colModel : [
...
{name:'Mydate', ...formatter: 'date', formatoptions:{newformat 'm/d/Y'}, ...},
...
]
这些列属性对我有用
formatter: "date", formatoptions: { newformat: "ISO8601Long" }