Javascript 如何在fullcalendar V5的警报中显示说明

Javascript 如何在fullcalendar V5的警报中显示说明,javascript,events,fullcalendar,alert,Javascript,Events,Fullcalendar,Alert,我正在尝试显示有关fullcalendar版本5中事件的一些信息。除说明外,所有内容都将显示。它说:未定义。我做错了什么,如何在警报中显示描述内容 eventClick: function(info) { var eventObj = info.event; alert('ID: ' + info.event.id + 'Title: ' + info.event.title + 'Start: ' + info.event.start + 'Description: ' +

我正在尝试显示有关fullcalendar版本5中事件的一些信息。除说明外,所有内容都将显示。它说:
未定义
。我做错了什么,如何在警报中显示描述内容


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',
          
        }
]

根据文档使用扩展道具的
extendedProps
。查看以下内容:非标准字段

因此:


很好!Thnx
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',
          
        }
]