How can I set Fullcalendar options dynamically

后端 未结 7 681
广开言路
广开言路 2020-12-17 16:22

How can I set the minTime and maxTime options after the calendar is created?

I tried the following, which doesn\'t work:

$(         


        
7条回答
  •  醉梦人生
    2020-12-17 16:43

    This code just did fine for me. Call this function anywhere and pass as many custom variables to it, but don't forget to destroy the previous calendar first

    function initializeCalendar( timeIntervalCustom ) {
      $('#calendar'+id).fullCalendar({
      slotMinutes: timeIntervalCustom,
    
    });                       
    
    }
    
    $('#calendar').fullCalendar("destroy");
    initializeCalendar(10);
    

提交回复
热议问题