Primeng: Rewrite Schedule to support FullCalendar 4.0.0-alpha.2 and future

Created on 15 Oct 2018  路  8Comments  路  Source: primefaces/primeng

I'm submitting a ... (check one with "x")
```
[X ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

The scheduler API is completely out of sync with the alpha version of fullcontrol. For instance, it's still using the view Render callback (fullcalendar has replaced it the datesRender callback) and the eventClick callback is also wrong (its 3 parameters are now passed as an object).

When can we expect these issues to be solved?

Thanks,

Most helpful comment

Is it possible to get some upgrade guide or something? For instance, how do I use the onViewRender and eventRender properties that were in p-schedule, in the new p-FullCalendar?

All 8 comments

I have a similar problem using version 4.0.0-alpha.2 of fullcalendar, and version 6.1.4 of primeng.
In my case the line 231 of schedule.js is using the unexisting removeEventSources method of fullcalendar.js. This method is documented as deprecated in https://fullcalendar.io/docs/v4/release-notes#event-source.

Does any1 have a solution to this ? I have the same problem, primeng 6.15 and fullcalendar 4.0.0-alpha.2

onViewRender does not even work... and when i get events the normal way i get this.calendar.removeEventSources is not a function

Same issue here. We'd need a workaround. We can't use this version with this problem.

Yes, this issue causes this.calendar.option is not a function errors for me (when changing the [height] after initialisation) because another change in version 4.0.0-alpha.2 is the method for dynamically setting options (https://fullcalendar.io/docs/v4/release-notes#core).

The current TypeScript code of this.calendar.option(...) needs to change to this.calendar.setOption(...).

I believe that I too am having an issue with this, as I cannot get onDayClick to trigger. I am using the exact same code as the onEventClick output, but am not able to get a debugger statement to stop the execution at that point.

Below is a snippet of the code that I am using, note that the onEventClick is working fine, but the onDayClick is not working.

<p-schedule
  [events] = "calendarEvents"
  [header]="header"
  [weekends]="displayWeekends"
  [editable]="editable"
  [droppable]="droppable"
  [eventStartEditable]="eventStartEditable"
  [eventDurationEditable]="eventDurationEditable"
  [nowIndicator]="displayNowIndicator"
  [timeFormat]="timeFormat"
  (onDayClick)="dayClick($event)"
  (onEventClick)="eventClick($event)"
  >
</p-schedule>
@Output() onDayClick: EventEmitter<any> = new EventEmitter<any>();
  @Output() onEventClick: EventEmitter<any> = new EventEmitter<any>();

  dayClick(calEvent: any) {
    debugger;
    this.onDayClick.emit(calEvent);
  }

  eventClick(calEvent: any) {
    debugger;
   this.onEventClick.emit(calEvent);
  }

Working on this now, seems like API has changed a lot so need to check what has changed. Also moment.js seems optional now which is a huge plus for smaller bundles!

Is it possible to get some upgrade guide or something? For instance, how do I use the onViewRender and eventRender properties that were in p-schedule, in the new p-FullCalendar?

Is it possible to get some upgrade guide or something? For instance, how do I use the onViewRender and eventRender properties that were in p-schedule, in the new p-FullCalendar?

Did you find any solution, how we can use eventRender in p-fullCalendar?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pchristou picture pchristou  路  3Comments

Helayxa picture Helayxa  路  3Comments

watalberto picture watalberto  路  3Comments

just-paja picture just-paja  路  3Comments

jisqaqov picture jisqaqov  路  3Comments