Specific template for event when create by Dragging and Save

Hello everyone!!

I’ve specified some special classes for some of my events, based on its properties and it’s working properly when loading data from server using:

scheduler.templates.event_class (…)

But the question is,
How could I modify template when creating a new event? It takes the default one when the drag starts.

Another question is, my event is not refreshing template when I press Save, although the event has been saved properly in Database. It works if a move to another week and return.

Thanks a lot!

You can check is property defined or not in the template, or set default value of property after creation, like next

scheduler.attachEvent("onEventCreated", function(id){ scheduler.getEvent(id).myproperty = "myvalue"; return true; })
docs.dhtmlx.com/scheduler/api__s … event.html

my event is not refreshing template when I press Save
Most probably you have some js error during saving. Check the browser’s console.