xiaostudy

导包请看官方:https://www.layui.com/doc/modules/laydate.html#use

例如:

<input type="text" id="yearCode" class="bs-input" style="width:130px;"  placeholder="年份">

js

layui.laydate.render({
    elem: \'#yearCode\' ,//input的id
   type: \'date\'//年月日,也是默认,不要这个也可以 });

 

默认使用

type: \'year\'

 

隐藏底部+点击就选择,两个必须一起,不然选择不了日期

showBottom: false,
change: function(value, date, endDate){
    $(\'#yearCode\').val(value);
    $(\'.layui-laydate\').remove();
}

 

官方:https://www.layui.com/doc/modules/laydate.html

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-16
  • 2021-12-15
  • 2022-01-01
  • 2021-10-26
  • 2022-12-23
相关资源
相似解决方案