新的时间插件,在点击弹出来的初始状态,默认选择的时间需要调整

This commit is contained in:
cxt 2017-03-06 23:20:44 +08:00
parent f0b7846453
commit 70a50757d5
1 changed files with 2 additions and 0 deletions

View File

@ -573,10 +573,12 @@
var _this = this;
_this.now = function() {
var d = new Date();
if( options.yearOffset )
d.setFullYear(d.getFullYear()+options.yearOffset);
d.setMinutes(0);
d.setSeconds(0);
d.setHours(d.getHours() + 1);
return d;
};