How to get the event clicked in agenda view

I need to add event in a cart and i need to show which one are in the cart to add a class to display an icon with css like this :

In the calendar view,

calendar: { type: 'week' },

i get the id easily with

 onEventClick: function (data) {
       var myEvent = $(".mbsc-calendar-labels").find(`[data-id='${}']`);

but on mobile i use another view

agenda: { type: 'day' },

and there is no “DATA-ID” in the DOM…

How can i find the clicked element on agenda view ?

i found the answer…

i just needed to render myself the event… and include the id…

renderEvent : function (data) {
       return '' + '<div class="mm-start" data-id="' + + '">'  data.start + ' - ' + data.end +'</div>'