We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
html:
问题出在173行
jet.sortDate = function (time,format) { var timeObj = {}, newtime = [], mats = regymd.split("|"), subhh = jet.checkFormat(format).substring(0, 2) == "hh" ? true :false, numArr = jet.IsNum(time) ? (jet.reMacth(subhh ? time.replace(/(.{2})/g,"$1,") : time.substr(0,4).replace(/^(\d{4})/g,"$1,") + time.substr(4).replace(/(.{2})/g,"$1,"))) : jet.reMacth(time), matArr = jet.IsNum(time) ? (jet.reMacth(subhh ? format.replace(/(.{2})/g,"$1,") : format.substr(0,4).replace(/^(\w{4})/g,"$1,") + format.substr(4).replace(/(.{2})/g,"$1,"))) : jet.reMacth(format); $.each(numArr,function (i,val) { timeObj[matArr[i]] = val; });
这里的$.each有问题, 报错Uncaught TypeError: Cannot read property 'length' of null 问题是296行和297行
var initVal = jet.isValHtml(objCell) ? objCell.val() : objCell.text(); var inVals = jet.sortDate(initVal,jet.format);
initVal 是 4个空格 故 jet.sortDate 函数的 time是" ", 最后导致 numArr 是null(jet.reMacth(time)), 在后面的 $.each函数中调用jquery的each函数, 有个a.length>0 这种, 报错了.
解决办法, 就是:jet.sortDate(time,format), time值为空格或者多个空格, 应该设置一个默认值,比如当前时间. 这样就可以解决问题
if ($.trim(time)=="") { var tmptime = new Date(); time = tmptime.format("yyyy-MM-dd hh:mm:ss"); }
The text was updated successfully, but these errors were encountered:
好像没有问题了, 请关闭这条issue吧
Sorry, something went wrong.
No branches or pull requests
html:
问题出在173行
这里的$.each有问题, 报错Uncaught TypeError: Cannot read property 'length' of null
问题是296行和297行
initVal 是 4个空格 故 jet.sortDate 函数的 time是" ", 最后导致 numArr 是null(jet.reMacth(time)), 在后面的 $.each函数中调用jquery的each函数, 有个a.length>0 这种, 报错了.
解决办法, 就是:jet.sortDate(time,format), time值为空格或者多个空格, 应该设置一个默认值,比如当前时间.
这样就可以解决问题
The text was updated successfully, but these errors were encountered: