How to customize event line content in time line tree mode

before: it’s just a line of Task-D-52688


btn A btn B


now i have tried this
scheduler.templates.event_bar_text to return a html string template
but how can i get each instance’s event data when i click the button?


There is getEvent() method to get event object

thank you, but how can i get the event id(or event object),when i click the button which returns from function of scheduler.templates.event_bar_text.
may be there are 10 event lines ,each of them has my custom button in it,they are all same html string i cant attach to their each event object after return
following is the code

scheduler.templates.event_bar_text = function (start, end, event) {
return `<button>my buttons</button>` //how to get event object when click ?

There are 2 ways to get id value.

Add onclick event to the button in the template and put event id as a parameter to function

scheduler.templates.event_bar_text = function (start, end, event) {
	return '<button onclick="func('')">my buttons</button>' 

The second way is using onClick handler. If also fires when you click on the button.

Check how both ways work in the sanippet

thank you so much :slight_smile: