如何在 fullcalendar V5 的警报中显示描述

How to show description in alert from fullcalendar V5

我正在尝试显示有关全日历版本 5 中某个事件的一些信息。除了描述外,所有内容都已显示。它说:undefined。我做错了什么以及如何在警报中显示描述的内容?


eventClick: function(info) {
    var eventObj = info.event;
    alert('ID: ' + info.event.id + 'Title: ' + info.event.title + 'Start: ' + info.event.start  + 'Description: ' + info.event.description );
},
events: [
        {
          id: 'id_1111',
          title: 'All Day Event 1',
          start: '2021-04-01',        
          description: 'First description',
         
        },
        {
          id: 'id_2222',
          title: 'All Day Event 2',
          start: '2021-04-02',        
          description: 'Second description',
          
        }
]

根据文档https://fullcalendar.io/docs/event-object为此使用extendedProps。在下面查看:非标准字段

所以:

eventClick: function(info) {
    var eventObj = info.event;
    alert('ID: ' + info.event.id + 'Title: ' + info.event.title + 'Start: ' + info.event.start  + 'Description: ' + info.event.extendedProps.description );
},
events: [
        {
          id: 'id_1111',
          title: 'All Day Event 1',
          start: '2021-04-01',       
          description: 'First description',
         
        },
        {
          id: 'id_2222',
          title: 'All Day Event 2',
          start: '2021-04-02',        
          description: 'Second description',
          
        }
]