Our powerful JS Calendar component


Post by ehc-between »

Hi

i just upgraded from v5.3.6 to 5.6.3 of the calendar.

i have had this snippet of code running for some time without any problems:

// ---------------------------- Calendar widget processContext ----------------------------
    const resourceFilter = this.calendar.sidebar.widgetMap['resourceFilter'] as ResourceFilter;
    this.calendar.onBeforeActiveItemChange = (event: any) => {
      console.log(event.activeIndex == 2 || 3)
      if (event.activeIndex == 2 || event.activeIndex == 3) {
        resourceFilter.deselectAll()
        resourceFilter.select(this.currentUser.user_id.toString())
      }
      else {
        resourceFilter.selectAll()
      }
    }

after the upgrade i get an error (see image)
has something changed or am i doing it wrong here ?

Attachments
Screenshot 2023-12-14 at 12.31.07.png
Screenshot 2023-12-14 at 12.31.07.png (47.69 KiB) Viewed 521 times

Post by Animal »

I think I see a bug. Do you have a change listener added to the resourceFilter?


Post by Animal »


Post Reply