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 :
17

In the calendar view,

calendar: { type: 'week' },

i get the id easily with

 onEventClick: function (data) {
       var myEvent = $(".mbsc-calendar-labels").find(`[data-id='${data.event.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.id + '">'  data.start + ' - ' + data.end +'</div>'
    },