单击时如何以全日历显示渲染事件

时间:2019-10-30 13:53:31

标签: angular fullcalendar

日历事件正在工作并根据其相应日期正确显示,但是我想单击特定日期并显示该事件。这是我的代码

 handleDateClick($event) {
let DateStart = this.convertDate($event.view.currentStart);
let DateEnd = this.convertDate($event.view.currentEnd);
this.TradePerformanceServ.getCalendarTradePerformance(this.user, DateStart, DateEnd).then(res => {
  this.calendarEvents = res.performance;
  for (var i = 0;i < res.performance.length;i++){
    console.log('Amount: ', res.performance[i].title);
  }

  console.log('Server response  ', this.calendarEvents);

  const dialogRef = this.dialog.open(ModalCalendarGainLossComponent, {
    maxWidth: '100vw',
    width: '300px',
    maxHeight: '100vh',
    data: {
      amount: res.performance[0].title,
      date: $event.dateStr
    }
  });
})};

我想通过数据{amount:'insert_amount_value'}参数传递事件。截至目前,当我单击特定日期时,它将打印所有事件值。

谢谢。

0 个答案:

没有答案