Refresh MbscEventcalendarView after changing startDate and endDate

I’m getting my startDate and endDate from an API. How can I refresh the view to get those into the calendar?

I tried:

view: MbscEventcalendarView = {
    schedule: {
      type: 'week',
      allDay: false,
      startDay: 1,
      endDay: 1,
      startTime: '07:00',
      endTime: '19:00'

and then

this.view.schedule.startDay = this.startWeekDay
this.view.schedule.endDay = this.endWeekDay

I tried
@ViewChild("myEventcalendar", { static: false })
instance: MbscEventcalendar;
but there’s no change

Hi @Bastifix,

I’m no expert but looking at the example here –

You’ll probably need to update these two properties – selectedDate and size under calendar view.

I think you’ll be putting your start date as the value for selectedDate and for the size that will be the difference or distance between your start date and end date.

Hope this helps

Thanks @Kebs! Set the
this.selectedDate = this.myEvents[0].start
worked to navigate to the corresponding day without
which requires @ViewChild and the presence of the MbscCalendar when loading the page - thanks a lot!

But I couldn’t find anything about the size you mentioned. At the moment I can load new events at every time, but when changing the MbscResource I’ve to reload the page to see the changes.
Do you have another hint here?

Sorry for the late reply @Bastifix; I was referring to this


1 Like