I have an event template:
<script id="event-template" type="text/x-kendo-template">
<div style='background-color: #=Color#'>
<span>#= title #</span>
</div>
</script>
I base the color on the start date of the event which works fine for all events except for those with recurrence events.
Since the parent recurrence event was set up in the past it displays the color data from the parent and not the actual recurrence event which is in the future.
How can I setup the recurrence event data when it is displayed on the scheduler?
5 Answers, 1 is accepted

Fixed it:
<script id="event-template" type="text/x-kendo-template">
#if(start >= new Date()){#
<div style='background-color: blue'>
#}else{#
# if (ProcedureCode == null) {#
<div style='background-color: gray'>
#}else{#
<div style='background-color: darkgreen'>
#}#
#}#
<span>#= title #</span>
</div>
</script>
But if the event length is longer than the title, it shows the default background.
The described issue seems be a styling problem that should be addressed with custom CSS. Could you send us a repro demo (Dojo or smth else), which we can review locally? Thus we will be able to fully understand the case and suggest the most suitable solution promptly.
Regards,
Georgi Krustev
Telerik
I would like to follow up my last message to provide additional details about the styling.
If you would like to change the background of the event with CSS class name, then you can use the following approach: Another option is to render the custom CSS class in the event template and then manually move that class to the div.k-event element in the widget's dataBound event. Thus the styling will be applied to the whole event element.
Regards,
Georgi Krustev
Telerik

So I changed the event template to this:
<script id="event-template" type="text/x-kendo-template">
<div class="movie-template">
<h3>#: title #</h3>
</div>
</script>
And you can see that the red background now shows for your events as well.
The approach is the same - you need to set margin:0 to the first element in the template:
Regards,
Georgi Krustev
Telerik