【layui】lay.each后laydate中change获取dom设值
layui.use(['form', 'laydate'], function () { var form = layui.form; var laydate = layui.laydate; lay('.yearClass').each(function () { laydate.render({ elem: this, showBottom: false, position: 'fixed', trigger: 'click', type: 'year', change: function (value, date, endDate) { $(this.elem).val(value); $('.layui-laydate').remove(); } }); }); form.render(); });