Fullcalendar - limit selectable to a single day

前端 未结 6 715
慢半拍i
慢半拍i 2020-12-10 04:31

By default if you enable the \'selectable\' attribute it will allow you to click and drag and select several days. I would like to only allow the user to select a single day

6条回答
  •  旧时难觅i
    2020-12-10 05:19

    This will be executed only when the user selects a day

    // ...
    select: function(start, end){
        if(moment(start._d).add(1, 'days').format('YYYY-MM-DD')==moment(end._d).format('YYYY-MM-DD')){
                //  just select one day
        }
    },
    // ...
    

提交回复
热议问题