Fullcalendar - 限时可选择一天 [英] Fullcalendar - limit selectable to a single day

查看:132
本文介绍了Fullcalendar - 限时可选择一天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,如果启用可选属性,它将允许您单击并拖动并选择几天。我只想让用户选择一天,而不是拖动多个。是否有一种方法可以启用可选择功能,但是禁用了与之相关的拖动功能? 如果你想要为了将突出显示限制在议程周视图中的某一天,您可以使用以下内容:

  selectConstraint:{
start:' 00:01',
end:'23:59',
},

如果你想限制你可以使用的事件

  eventConstraint:{
start:'00:00' ,
结束:'24:00',
},


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, not drag over multiple. Is there a way to have 'selectable' enabled, but disable the dragging feature that comes along with it?

解决方案

If you want to limit highlight to a single day in agenda week view you can use following:

  selectConstraint:{
      start: '00:01', 
      end: '23:59', 
    },

if you want to limit the event you can use

eventConstraint:{
      start: '00:00', 
      end: '24:00', 
    },

这篇关于Fullcalendar - 限时可选择一天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆