是否有可能在fullcalendar.js中将插槽分成4个切片?

时间:2019-09-23 09:58:29

标签: javascript html css fullcalendar fullcalendar-4

我已经和全日历一起工作了几个月,当创建一个事件时,该事件会占据整个位置。

要在同一广告位中创建另一个事件,我必须手动修改时间。

我正在尝试这样做 enter image description here

这是我的代码

 
document.addEventListener('DOMContentLoaded', function() {
    var initialLocaleCode = 'es';
    var calendarEl = document.getElementById('calendar');
    var calendar = new FullCalendar.Calendar(calendarEl, {
      plugins: [ 'interaction', 'dayGrid', 'timeGrid', 'list' ],
      header: {
        left: 'prev,next today',
        center: 'title',
        right: 'dayGridMonth,timeGridWeek,timeGridDay'//dayGridMonth,timeGridWeek,timeGridDay,listMonth
      },
      allDaySlot:false,
      hiddenDays: [ 0 ],
      minTime: "09:30:00", //start hour
      maxTime: "19:30:00", // end hour
      slotDuration: '00:15',
      slotLabelInterval: 15,
      defaultView: 'timeGridDay',
      locale: initialLocaleCode,
      buttonIcons: true, // show the prev/next text
      weekNumbers: true,
      navLinks: true, // can click day/week names to navigate views
      editable: true,
      eventLimit: true,
      titleFormat: { // will produce something like "Tuesday, September 18, 2018"
            // month: 'long',
            // day: '2-digit',

            year: 'numeric', month: 'long', day: 'numeric'
      },// allow "more" link when too many events
      eventSources: [{
           url: 'request/obtener_citas.php',
           type: 'POST',
           cache: false
       }],
      timeFormat: 'H(:mm)' ,
      dateClick: function(date,jsEvent,view) {
        console.log("show modal to add event");

      },
      eventClick: function(info) {
        console.log("show modal to edit event");
      }
    });

    calendar.render();



  });

0 个答案:

没有答案