Easyui DataGrid Date Time is not normal and the background Java type is converted to date via JSON tool one to the foreground so it is inconvenient to format it,
The formatting code is as follows:
$ (' #gridTable '). DataGrid ({title: ' System notification and advertising management ', Loadmsg: ' In data loading, please later ... ', Rownumbers:true, Pagination:true, Singleselect:false, Pagesize:10, pagelist: [5, A, m], fi Tcolumns:true, Fit:true, striped:true, Nowrap:false, url: ' list.do ', IDfield: ' m Ediaid ', columns:[[{field: ' ID ', checkbox:true}, {field: ' System ', Title: ' Applicable Systems '}, {field: ' InfoType ', title: ' Cancel
Type ', formatter:function (value, row, index) {if (value==1) return "text";
if (value==2) return "picture";
if (value==3) return "video";
else return "<span style=\" color:red\ "> Unknown </span>"; }, {field: ' title ', Title: ' Caption '}, {field: ' Content ', Title: ' Contents ', width:140}, {field: ' Issuetime ',
Title: ' Effective Time ', Formatter:function (value,row,index) { var unixtimestamp = new Date (value);
return unixtimestamp.tolocalestring (); }, {field: ' Disabledtime ', title: ' Invalid Time '}, {field: ' UserId ', title: ' User ID '}, {field: ' UserName ', title : ' operator '}]],
Formatting appears normal,