B B丶n 2016-09-20 16:09 forEachAncestorOf(dateInputElem, function(ancestorNode) { if (window.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') { //这里报错 dateInputHasFixedAncestor = true; return false; } });datetimepicker.full.js文件的2557行的这句:if (window.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed')报这个错:Uncaught TypeError: Failed to execute 'getComputedStyle'on 'Window': parameter 1 is not of type 'Element'.要怎么解决这个错误?? 沧 沧海桑田 2016-10-31 16:10 2557行 改成 if (ancestorNode && window.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') 和 2504行改成 } while (node && node.nodeName !== 'HTML'); c caixueyan 2019-03-18 17:50 感谢您的回复,解决了我的问题,时隔多年,优秀
h hg 2016-08-11 16:08 Uncaught ReferenceError: DateFormatter is not defined 加在我自己的项目里就会报这个错,虽然还是可以用的,不过不清楚为啥
h hg 2016-08-11 13:08 为什么 分钟只能到23呢,这个在哪里修改 h hg 2016-08-11 13:08 format:'Y/m/d',就可以了 h hg 2016-08-11 14:08 这只能不显示时间,还是先知道分钟怎么可以显示60 h hg 2016-08-11 16:08 sorry,用的时候挺急,没注意看,23小时是对的..
forEachAncestorOf(dateInputElem, function(ancestorNode) { if (window.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') { //这里报错 dateInputHasFixedAncestor = true; return false; } });datetimepicker.full.js文件的2557行的这句:
if (window.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed')报这个错:
要怎么解决这个错误??