因为之前页面有用到时间插件,所以在这里是直接复制粘贴过来,class加了times,对times这个类进行循环渲染
lay-key=”7″>
必填
保存之后,点击文本框,时间插件一闪而过,检查了html和js,没有缺参数.然后去官网比对,官网没有循环的案例.没办法百度,翻了好几页,说的都没能解决问题,最后在一个博客看到lay-key这个参数,果然删除就正常了.下面是html和js,复制可用
必填
//当前时间
var nowTime = new Date().valueOf();
//日期范围
layui.use(‘laydate’, function() {
var laydate = layui.laydate;
lay(‘.times’).each(function(){
var times = (‘#’+$(this).attr(‘name’));
// console.log(times);
laydate.render({
elem: times
,min: nowTime
,range: true
});
});
})
ps:新开窗口过小也会导致插件异常
文章来源于互联网:layui 页面同时加载多个时间插件 出现闪退
Newman VA, Thomson CA, Rock CL, Flatt SW, Kealey S, Bardwell WA, Caan BJ, Pierce JP; Women s Healthy Eating and Living WHEL Study Group cialis online purchase
Both the NCCTG N9831 interim analyses and combined SIGNAL PHARE trials found no significant difference between concurrent and sequential treatment regimens nolvadex
Distribution of and changes in zpack medication
创客贴: http://hualgwgc.com/