How to limit timeslot selection to one day in Fullcalendar Jquery?

只愿长相守 提交于 2019-12-08 04:35:57

问题


I want to select time slots and create event only on the particular start date. the selection should not be enable for next or previous days. For Example in the below image I have started the event on Mon 11/10 (6.30 am) the end time should be within the same day. The User should not be able to select next days or previous days. In Google calendar you can see this feature.

Kindly share how can I do this here. Thanks for you time.


回答1:


I wanted to prevent the events from spanning across multiple days on resize. I don't understand if it is the same as your issue.

In the calendar configuration I set:

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

Reference: http://fullcalendar.io/docs/event_ui/eventConstraint/




回答2:


you could use

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



回答3:


According to the docs, setting the selectable property to false should be able to help you achieve that.



来源:https://stackoverflow.com/questions/27716706/how-to-limit-timeslot-selection-to-one-day-in-fullcalendar-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!