fullCalendar - 禁用多选日

时间:2015-03-19 21:03:24

标签: javascript jquery html twitter-bootstrap fullcalendar

我想在fullCalendar中禁用多选日。只能选择一天。我在这里和fullCalendar网站搜索,但我没有找到我想要的。

1 个答案:

答案 0 :(得分:2)

DEMO:http://jsfiddle.net/opqdqLa0/

var calendar = $('#calendar').fullCalendar({
  editable: true,
    selectable: true,
  //header and other values
  select: function(start, end, allDay) {
      if(end.getTime() != start.getTime()){
          calendar.fullCalendar( 'unselect' ) ;
      }
   }
});