Displaying event selection

I would like to have the selected event displayed in another way.
For example by having a bigger border and/or border color
I am thinking about it, thinking that it is possible, but not sure about the way to do it properly.
Can you help me ?

Thanks for your help

Just redefine event_text or event_class template, inside template you can have some logic which will check

if (ev.id == scheduler._select_id) return "selected content"; else return "normal content";

I have tried to add the code to the event_class
But the event_class fires only when the events are loading.
It doesn’t fire when I click the event…
Should I have to update the calendar each time ?

Hello,

event_class template is used every time event(s) is rendered. That happens during loading, changing views, selecting an event and so on. There is no need to reload events.

Best regards,
Ilya

I don’t understand then…
I tried to add a class, but if I check with the debugger, the class was not here…
I tried to add an alert messsage, and saw that clicking on the event doesn’t trigger this event.
Have I missed something ?
Would you have an example ? (because, in one of my try, I used firefox debugger to add a border-width to the event, and the render was really smooth… I tried to add the property directly to the div having the class resultng from event_class.

Thanks for your help

Check the attached one.
1300183608.zip (49.5 KB)

Something is bothering me…
I understand your examlpe.
I have tried to do the same (modifying only the font to be bold).
I have add the css class definition as in your example
I have modified event_class as in your example
But when clicking the event, if I look in the debugger I never trigger the event_class template.
Do you see any reason why ?

event_class will be triggered each time when event is rendered.
when you changing view, or selecting event - it must be triggered.

Doublecheck that this template is not redefined second time by any other code.

If I use the select function it trigger the event (made the try for something else)
If I click simply with the mosue, it doesn’t trigger the event
In another part of the code, I call updateEvent, it seems to me that it was to force to update the Event (to have my event changing of color). So I think I will have to call updateEvent each time I click an event. But will that be enough ? as if I update only one event, the previous one will still stay selected, isn’t it ?

If I click simply with the mosue, it doesn’t trigger the event
Normally single clicking of not selected event will result in scheduler.select call
It will not be called when

  • event already selected
  • you have onClick event handler , which doesn’t end with “return true”