Our pure JavaScript Scheduler component


Post by geo.belas »

Hello there,

I've been looking around the Bryntum documentation and I am unable to find a function or event that triggers every time the user selects one or more rows on the Scheduler. Does such a method exist or should I create one on my own? Ideally, I want to be able to click on one of the elements from the columns and get all the values related to that row. I have created the following images to visualize what I want to achieve.

Click Event:

click event Start.png
click event Start.png (72.95 KiB) Viewed 726 times

Values in other Component:

click event Other Component.png
click event Other Component.png (2.88 MiB) Viewed 726 times

Post by mats »


Post by geo.belas »

Hello, mats

I had stumbled upon the same one myself when I was looking in the doc but when I tried to console log it didn't get triggered. Here is how my code looks:

<BryntumScheduler
	resources={resources}
	events={events}
	viewPreset="hourAndDay"
	width="100%"
	readOnly={true}
	timeRangesFeature={{
		showHeaderElements: false
	}}
	regionResizeFeature={true}
	treeFeature={true}
	treeExpanded={true}
	startDate={start}
	endDate={end}
	expandAll={true}
	//Where it is used			
	selectionChange={(e) => {
		console.log(e);
	}}
	/>
		

Am I using it at the wrong location?


Post by mats »

To listen for events you should write:

 onSelectionChange={(e) => {
		console.log(e);
	}}

Post by geo.belas »

Thank you very much! That is exactly what i need


Post Reply