jeDate
jeDate copied to clipboard
初始化日期不是当前日期直接点击确认按钮时间会变为当前时间
修复
var getCurrValue = function (){
var mats = jet.reMatch(that.format), isEmpty = that.getValue() != "",curVal = [],
parmat = that.dlen == 7 ? "hh:mm:ss" : "YYYY-MM"+ (that.dlen <= 2 ? "":"-DD");
//修改
var result = that.valCell.value;
result = result.substr(0,11);
var nowTime = [jet.parse(jet.getDateTime({}), parmat)];
nowTime = nowTime[0];
var time1 = new Date(result).setHours('0');
var time2 = new Date(nowTime).setHours('0');
var nDays = (parseInt((time1 - time2) / 1000 / 3600 / 24));
var redate = {
DD: nDays
};
that.selectValue = [jet.parse(jet.getDateTime(redate), parmat)];
}
谢谢你的参与