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();
});

 

相关文章:

  • 2021-05-12
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案