Our pure JavaScript Scheduler component


Post by eferro@qubicaamf.com »

Hi,
in Scheduler Pro I'm listening the 'scheduleClick' event, there is any way to add a class or a border style to a clicked slot?


Post by tasnim »

Sounds like you're looking for https://bryntum.com/products/scheduler/docs/api/Scheduler/feature/ScheduleContext feature
Here is a codepen demo for you https://codepen.io/dv-auntik/pen/WbbBwwg?editors=0110

PowerToys_kN2to6n7Te.gif
PowerToys_kN2to6n7Te.gif (439.8 KiB) Viewed 292 times

Best regards,
Tasnim

How to ask for help? Please read our Support Policy


Post by eferro@qubicaamf.com »

Cool! It's what I looked for!

And there is any way to reset the class on the scheduler if I select an event?

I try using the listener "eventClick" and add a class to the event, but I'm not able to reset the class on the scheduler slot, and the result is that bot are bordered

scheduleContextFeature: {
	triggerEvent : "click",
		widget : {
			type: "widget",
			cls: "slot-selected-border"
		}
	}
},
...
listeners: {
	eventClick: ({eventRecord}) => {
		eventRecord.cls = "event-selected-border";
		return false;
	}
}	
Attachments
Screenshot 2025-05-30 at 17.36.42.png
Screenshot 2025-05-30 at 17.36.42.png (23.15 KiB) Viewed 250 times

Post by tasnim »

After setting the cls to the event, here is how you could clear the schedule context

  
listeners : { eventClick(props) { props.eventRecord.cls = 'hello'; props.scheduler.features.scheduleContext.context = null; } },

Best regards,
Tasnim

How to ask for help? Please read our Support Policy


Post by eferro@qubicaamf.com »

Cool! That's works amazing!
Thanks for the support!


Post Reply