jeDate icon indicating copy to clipboard operation
jeDate copied to clipboard

初始化日期不是当前日期直接点击确认按钮时间会变为当前时间

Open jx915 opened this issue 7 years ago • 1 comments

修复

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)];	

}
			

jx915 avatar Aug 25 '18 04:08 jx915

谢谢你的参与

singod avatar Sep 27 '18 03:09 singod