Our powerful JS Calendar component


Post by orthobridge »

I added a custom copy option to the event tooltip that i intend to show conditionally. if i click the event that meets the condition, the option shows, then if i click the event that doesn't meet the condition, the option hides, if i go back to click the event that meets the condition again the option doesn't show anymore.

eventTooltip : {

                // Override the default which is to show on click.
                //showOn : 'hover',
                deleteEvent : null,
                tools : {
                // Add a new tool for our own operation
                newTool : {
                cls : 'b-fa b-fa-clone',
                tooltip : 'Copy to clipboard',
                handler() {
                 //   console.log("patient_avatar: "+this.eventRecord.resourceAvatarUrl)
                
                _showFutureBookings(this.eventRecord)
            
                }
                }
                },
                listeners : {
		beforeShow({ source }) {
		if (this.eventRecord.data.isAppointmentBlocker) {
			source.tools.newTool = false;
		}
}

}
	

Post by Animal »

Why not just hide/show it?

beforeShow() {
    this.tools.newTool.hidden = this.eventRecord.data.isAppointmentBlocker;
}

Post Reply