修复时间展示双位数前会多0问题
This commit is contained in:
@@ -382,7 +382,7 @@ function showBandwidthChart(id,unitType,xdata,ydata,title){
|
||||
var chooseDate=new Date($('#beginDate').val());
|
||||
chooseDate=chooseDate.setDate(chooseDate.getDate()+1);
|
||||
var modifyTime=new Date(chooseDate);
|
||||
$('#endDate').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
||||
$('#endDate').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user