Merge pull request #40 from huarxia/master

修复选中今天 如果YYYY-MM-DD hh:mm:ss格式,获取当前的时分秒
pull/61/head
贤心 2017-03-19 11:24:19 +08:00 committed by GitHub
commit 635c7e2522
2 changed files with 11 additions and 2 deletions

View File

@ -799,7 +799,16 @@ Dates.events = function(){
var now = new Date();
// 2016-09-23 18:20:54 修复选中今天choose方法得不到数据
// Dates.creation([now.getFullYear(), now.getMonth() + 1, now.getDate()]);
Dates.elem[as.elemv] = laydate.now(0,Dates.options.format);
// 2016-09-26 10:49:25 修复选中今天 如果YYYY-MM-DD hh:mm:ss格式获取当前的时分秒
var hms = Dates.hmsin;
var date = new Date();
// 获取当前时间小时
hms[0].value = date.getHours();
// 获取当前时间分钟
hms[1].value = date.getMinutes();
// 获取当前时间秒
hms[2].value = date.getSeconds();
Dates.creation([Dates.ymd[0], Dates.ymd[1]+1, Dates.ymd[2]]);
});

File diff suppressed because one or more lines are too long