0

对我来说发生了一些奇怪的事情。在我的工作计算机上无法在 Internet Explorer e11 上运行 fullcalendar v5,但在我的个人计算机上它可以工作,并且它的版本比我的工作计算机低。有什么想法吗?

例如,我在网页https://fullcalendar.io/上看不到任何示例

或者这段代码

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

  var calendar = new FullCalendar.Calendar(calendarEl, {
    initialView: 'timeGridWeek',
    initialDate: '2020-06-07',
    allDaySlot:false,
    locale:'es',
    headerToolbar: {
      left: 'prev,next today',
      center: 'title',
      right: 'timeGridWeek,timeGridDay'
    },
    events: [
      {
        title: 'All Day Event',
        start: '2020-06-01'
      },
      {
        title: 'Long Event',
        start: '2020-06-07',
        end: '2020-06-10'
      },
      {
        groupId: '999',
        title: 'Repeating Event',
        start: '2020-06-09T16:00:00'
      },
      {
        groupId: '999',
        title: 'Repeating Event',
        start: '2020-06-16T16:00:00'
      },
      {
        title: 'Conference',
        start: '2020-06-11',
        end: '2020-06-13'
      },
      {
        title: 'Meeting',
        start: '2020-06-12T10:30:00',
        end: '2020-06-12T12:30:00'
      },
      {
        title: 'Lunch',
        start: '2020-06-12T12:00:00'
      },
      {
        title: 'Meeting',
        start: '2020-06-12T14:30:00'
      },
      {
        title: 'Birthday Party',
        start: '2020-06-13T07:00:00'
      },
      {
        title: 'Click for Google',
        url: 'http://google.com/',
        start: '2020-06-28'
      }
    ],
          slotLabelFormat: {
                hour: '2-digit',
                minute: '2-digit',
                omitZeroMinute: false,
                meridiem: false
            },
  });

  calendar.render();
});

4

1 回答 1

1

有同样的问题。IE控制台提示不理解()=>{}组合。因此,为了使其兼容,所有内容=>都应替换为function

于 2020-11-23T20:43:47.253 回答