StickNitro / ngx-fullcalendar

An Angular wrapper for the https://fullcalendar.io module
MIT License
11 stars 14 forks source link

Cannot read property 'id' of undefined #15

Closed SlimenTN closed 5 years ago

SlimenTN commented 5 years ago

Describe the bug When I try to drag and drop the event within the calendar I get this error: Cannot read property 'id' of undefined

To Reproduce What I did is : 1- prepare a simple event in my-component.ts like so:

  calendarOptions: FullCalendarOptions;
  events: EventObject[];
  constructor() { }

  ngOnInit() {
    this.calendarOptions = {
      titleFormat: 'DD MMMM YYYY',
      defaultDate: '2019-02-26',
      editable: true,
    };

    this.events = [
      { id: 2, title: 'Friends coming round', start: '2019-02-26T18:00:00', end: '2019-02-26T23:00:00' }
    ]
  }

2- call the calendar component inside my-component.html:

<ngx-fullcalendar 
    defaultView="month"
    [options]="calendarOptions"
    [events]="events">
  </ngx-fullcalendar>

Expected behavior Should drag and drop the event without any problem

Screenshots when I dropped that event I got the following error:

StickNitro commented 5 years ago

fixed in branch upgrade-v4-alpha