标签:前台 mat create str format option case oat 时间戳
找到如下代码
if( !isNaN( date - 0 ) && String(format).toLowerCase() == "u") { //Unix timestamp timestamp = new Date( parseFloat(date)*1000 ); }
改为,即去掉*1000
if( !isNaN( date - 0 ) && String(format).toLowerCase() == "u") { //Unix timestamp timestamp = new Date( parseFloat(date) ); }
前台调用
{ name: "createTime", formatter:"date", formatoptions: {srcformat:‘u‘,newformat:‘Y-m-d‘}, label: "<span>createTime</span>" }
标签:前台 mat create str format option case oat 时间戳
原文地址:http://www.cnblogs.com/wangdahai/p/6125389.html