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.