laydate报“日期格式不合法”和Cannot read property appendChild of undefined错误

       在我们用到laydate插件时,设置时间格式后,还是会报"日期格式不合法"或Cannot read property 'appendChild' of undefined的报错,但是laydate插件的功能可以正常使用,就是报这两个莫名的错误!

laydate报“日期格式不合法”和Cannot read property appendChild of undefined错误

点击laydate.js:2处,查看详情时,显示红框处有标红

laydate报“日期格式不合法”和Cannot read property appendChild of undefined错误

还有每次点击laydate插件事件时,第一次就会提示“日期格式不合法”的提示,就显得有点烦心

laydate报“日期格式不合法”和Cannot read property appendChild of undefined错误

 

处理方式:在这里laydate.js:2的标红处,把这种不影响功能的提示给注释掉,注释掉 t.elem.appendChild(n),

laydate报“日期格式不合法”和Cannot read property appendChild of undefined错误

(参考资料:https://www.cnblogs.com/liuyuhangCastle/p/10520386.html