laydate.js 月份区间选择插件

laydate.render({
      elem: '#reservation2'
      , type: 'month'
      , range: true,
      //format: '2018/09',
      theme: '#3c8dbc',
      value:'2018-09 - 2018-09',
      // value: time,
      done: function(value, startDate, endDate){
         // 回调函数
         console.log(value);
         console.log(startDate.year + "-" + startDate.month);
         console.log(endDate.year + "-" + endDate.month);
         //  $("#endDate").focus();
      },
      clear: function () {
         console.log("clear");
      },
      btns: ['clear', 'confirm']
         
});

猜你喜欢

转载自www.cnblogs.com/yuyedaocao/p/10976321.html