如何使用全日历事件定位在角度 7



>我正在尝试添加背景文本并根据开始和结束日期时间调整事件栏大小。你能告诉我如何使用定位的事件吗?您能否分享有关如何在事件上添加背景文本和调整事件栏大小的语法。

**例:**

{
    title : '66666',
    start : '2019-04-14 12:30:00',
    end   : '2019-04-14 16:30:00',
    title:<top right corner> TEXT1,
    custom text2: time
}

@ViewChild('fullcalendar') fullcalendar: FullCalendarComponent;
  ngOnInit() {
    this.options = {
      editable: true,
      displayEventTime: false,
      fixedWeekCount: false,
      eventTextColor: 'white',
      height: 650,
      header: {
        left: 'prev',
        center: 'title',
        right: 'next'
      },
      events : [{
          title : '66666',
          start : '2019-04-14 12:30:00',
          end : '2019-04-14 16:30:00',
        },
        {
          title : '88888',
          start : '2019-04-07 07:30:00',
          end : '2019-04-07 20:30:00',
        }
      ],
      handleWindowResize: true,
      themeSystem: 'bootstrap4',
      plugins: [dayGridPlugin, interactionPlugin],
      eventPositioned(info) {
        console.log(info);
      }
      <full-calendar #fullcalendar
        [events] ="options.events"
        [header]="options.header"
        [eventTextColor] ="options.eventTextColor"
        [height] ="options.height"
        [displayEventTime] ="options.displayEventTime"
        [themeSystem] = "options.themeSystem"
        [fixedWeekCount] = "options.fixedWeekCount"
        (dateClick)="dateClick($event)"
        [plugins]="options.plugins"
        (eventClick)="eventClick($event)"
      ></full-calendar>

你可以试试这个:

this.options = {
   eventPositioned: function(info){
        console.log("info of an event**strong text**",info);
      }
} 

相关内容

  • 没有找到相关文章

最新更新