您好, Everythink完美没有jqGrid上的日期时间:S如何解决这个转换问题?
答案 0 :(得分:1)
您可以在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'},
答案 1 :(得分:0)
您需要在colModel中将格式化程序设置为date,jqGrid将自动检测Microsoft日期格式。
不需要设置srcformat,但newformat可以是。
试试这个:
colModel : [
...
{name:'Mydate', ...formatter: 'date', formatoptions:{newformat 'm/d/Y'}, ...},
...
]
答案 2 :(得分:0)
这些列属性对我有用
formatter: "date", formatoptions: { newformat: "ISO8601Long" }