0

我正在使用完整日历,但在给定日期进行简单预订时遇到问题。问题是我不知道如何在一天内创建的每个事件中删除/隐藏标题。

4

1 回答 1

0

我添加了一个 CSS 来使用选择器隐藏事件标题.fc-title

document.addEventListener('DOMContentLoaded', function() {
  var Calendar = FullCalendar.Calendar;
  var calendarEl = document.getElementById('calendar');

  var calendar = new Calendar(calendarEl, {
    plugins: ['dayGrid'],
    events: [
      {
        title: 'Event Title',
        start: '2019-06-13'
      }
    ]
  });

  calendar.render();
});
.fc-title {
  visibility: hidden; /* hides event title */
}
<div id='calendar'></div>


<link rel='stylesheet' href='https://fullcalendar.io/releases/core/4.1.0/main.min.css'>
<link rel='stylesheet' href='https://fullcalendar.io/releases/daygrid/4.1.0/main.min.css'>
<script src='https://fullcalendar.io/releases/core/4.1.0/main.min.js'></script>
<script src='https://fullcalendar.io/releases/daygrid/4.1.0/main.min.js'></script>

于 2019-06-13T05:52:48.980 回答