Our powerful JS Calendar component


Post by vconstruct »

Hi I am using eventclick listener it is working perfectly fine in month view but this is not getting triggered in week view

if(this.calendarRef.instance.onEventClick) {console.log('click')}

This is not triggered during week view but works fine in month


Post by tasnim »

Hi,

Try using like this

    listeners : {
        eventClick() {
            console.log('click');
        }
    }

https://bryntum.com/products/calendar/docs/api/Calendar/view/Calendar#event-eventClick


Post by vconstruct »

Sure it works if we have done it as you have mentioned.

But the thing is we are looking for a different approach where we want to call it through calendar instance

 if(this.events?.onActivitySelected){
     this.calendarRef.instance.onEventClick = this.events.onActivitySelected;
 }

This is the code that is working fine for month view but it is not working for week view


Post by alex.l »

Hi,

But the thing is we are looking for a different approach where we want to call it through calendar instance

Please post more context, not clear what this code do and how it invoked. Best of all if you attach a full app that we can debug. It help us to answer faster.

Thanks.

All the best,
Alex


Post by vconstruct »

We have configured the instance through ref and want to access onEvent listener through this instance

calendar ref.png
calendar ref.png (51.29 KiB) Viewed 186 times

Post by tasnim »

Could you please attach a full test app? so we can run it and debug it?
A test app will make the assistance faster.


Post Reply