0

PrimeNG의 일정 구성 요소를 사용하여 사용자의 일정 이벤트를 표시하려고합니다. 달력이 표시되지만 Fullcalendar가 이벤트를 렌더링하려고하면 오류가 반환됩니다.
"ORIGINAL EXCEPTION: TypeError: Cannot read property 'scrollTop' of null"
이 프로젝트는 이미 Fullcalendar를 사용하고있는 angular1 버전에서 리팩터링하므로 이벤트는 올바른 형식이어야합니다. 아래에는 HTML, 구성 옵션 및 표시하려고하는 이벤트 모의가 포함되어 있습니다. 이벤트가 PrimeNG로 표시되지 않음 예약에서 속성을 읽을 수 없습니다 scrollTop of null


this.calendar.config = { 
    height: 900, 
    editable: true, 
    weekends: true, 
    eventLimit: true, 
    header: { 
    left: 'agendaDay,agendaWeek,month', 
    center: 'title', 
    right: 'today prev,next' 
    }, 
    dayClick: this.dayClick, 
    eventClick: this.eventClick, 
    eventDrop: this.stopDrag 
} 


그것은 아무리 내가 포함 어떤 옵션, fullcalendar 항상 같은 오류를 제공하지 않습니다 밝혀

template.html 

     <p-schedule id="calendar" class="calendar" [events]="calendar.sources" 
      [calendar]="myCalendar1" [height]="calendar.config.height" 
      [header]="calendar.config.header" [editable]="calendar.config.editable" 
      [weekends]="calendar.config.weekends" [eventLimit]="calendar.config.eventLimit" 
      (onDayClick)="calendar.config.dayClick" (onEventClick)="calendar.config.eventClick" 
      (onEventDrop)="calendar.config.eventDrop"> 
     </p-schedule> 

. 나는 옵션을 사용하지 않고 일정 템플릿을로드하려고 시도했지만 여전히 동일한 오류가 발생했습니다. 이것은 내가 스케쥴과 fullcalendar를 포함하는 방법에 관한 어떤 것이 맞지 않음을 나타냅니다. 나는 primem과 순간을 npm install --save를 통해 포함 시켰고, 그 다음에 html cdns를 통해 fullcalendar를 포함시켰다. 나는 구현 변경을 따라 here 으로 일정을 세우고 실행했다. 그런 다음 현재 구성 요소에 공급자 및 지시문으로 Schedule을 추가했습니다. 일정은 또한 내 구성 요소의 메서드 내에서 참조 할 수 있도록 내 클래스 생성자에 포함되어 있습니다.

답변

1

JQuery 3.0.0에 대한 업데이트가 Fullcalendar와 호환되지 않습니다. JQuery를 2.2.4로 롤백하면 모든 것이 제대로 작동합니다.

0

저는 fullcalendar와 동일한 문제가 있었으며 Isahiro의 대답이 해결책이었습니다. Bower와의 의존성 충돌로 jquery가 3.x로 업그레이드 되었기 때문에 해당 광산을 추가하려고했습니다. bower.json에 다음을 추가하여 bower가 2.x 버전을 사용하도록 할 수 있습니다.

"resolutions": { 
    "jquery": "~2.1.4" 
}