lbertenasco / ap-ng2-fullcalendar

Angular2 fullcalendar component
MIT License
35 stars 18 forks source link

Two calendars in the same view take the same options #66

Closed igonzalezespi closed 6 years ago

igonzalezespi commented 6 years ago

With this view:

  <div>
    <angular2-fullcalendar [options]="calendarOptions"></angular2-fullcalendar>
  </div>
  <div>
    <angular2-fullcalendar [options]="calendarOptions2"></angular2-fullcalendar>
  </div>

And Typescript:

  calendarOptions: Object = {
    defaultView: 'agendaWeek',
    defaultDate: '2016-09-12',
    editable: true,
    events: [
      {
        title: 'Conference',
        start: '2016-09-11',
        end: '2016-09-13'
      }
    ]
  };
  calendarOptions2: Object = {
    defaultView: 'agendaWeek',
    defaultDate: '2016-09-12',
    editable: true,
    events: [
      {
        title: 'Conference22222222',
        start: '2016-09-11',
        end: '2016-09-13'
      }
    ]
  };

Both calendars take the "calendarOptions". But if I comment the first calendar like this:

  <div>
    <!--<angular2-fullcalendar [options]="calendarOptions"></angular2-fullcalendar>-->
  </div>
  <div>
    <angular2-fullcalendar [options]="calendarOptions2"></angular2-fullcalendar>
  </div>

The second calendar take the second options as expected.

JMurph2015 commented 6 years ago

@ivannugo Did you figure out a solution to this?

igonzalezespi commented 6 years ago

No, I'm using this one: https://www.primefaces.org/primeng/#/schedule

Hope this works for you too.