Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jx915 opened this issue Aug 25, 2018 · 1 comment

Comments

@jx915
Copy link

jx915 commented Aug 25, 2018

修复

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

}
			
@singod
Copy link
Owner

singod commented Sep 27, 2018

谢谢你的参与

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants