Commit 2d99544a authored by 于广洋's avatar 于广洋

第一次进入后边如果有错误的 话,切换月份好用

parent 4e983808
......@@ -290,7 +290,7 @@ function initPage(companyInfo) {
//TODO 调用备案接口
});
// 格式化后台返回的时间
if(companyInfo){
if(companyInfo.config.return){
$("#getInputValue").val(tool.formatDate(companyInfo.sbsq));
nowdate = companyInfo.sbsq;
drawGrid(companyInfo);
......
......@@ -824,7 +824,12 @@ var JSTOOL = function() {
* 将000000格式化为0000-00-00
*/
this.formatDate = function(date) {
if(date){
return date.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3");
}else{
return ""
}
}
//字符串时间转时间戳用比较大小
this.bijiaodata = function(data, data1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment