how to update event_header of a specific event on click

I need to re-write the event_header of the new event. This is what I have done, but I’ve noticed that scheduler.templates.event_header = function()… loops through all the events. Is this the best way to update the event_header of a single item?

    scheduler.attachEvent("onEventCreated",function(id,ev){
        //this will fire on any changes to the event box ie. enlarging time slot
        console.log(id);

        scheduler.templates.event_header = function(start,end,ev){
            //this will loop through all the events
            if(ev.id == id){
                return '<i class="fa fa-bell reminder" style="color: red;"></i>&nbsp;<?php echo __('reminder'); ?>:&nbsp;' 
                        + scheduler.templates.event_date(start) + " - " 
                        + scheduler.templates.event_date(end);
            }else{
                return  scheduler.templates.event_date(start) + " - " 
                        + scheduler.templates.event_date(end);
                }
            

        };
    });

Hi,

Unfortunately, you can use only event_header template to update this value. And it really works for all events on the page.