There is the possibility to define custom display of events. There are several common instructions:
The DHXEventTemplate object has 4 properties:
Read the details here.
If you don't want to use the default 'drag', 'resize' controls you should set the CanDrag and CanResize properties to false and define your custom controls in the Template parameter.
In this case, note that some styles have special purpose (they must go first):
Here is a sample of some custom look:
public ActionResult CustomEventBox()
{
var sched = new DHXScheduler(this);
var evBox = new DHXEventTemplate();
evBox.CssClass = sched.Templates.event_class = "my_event";
evBox.Template =
@"<div class='my_event_body'>
<% if((ev.end_date - ev.start_date) / 60000 > 60) { %>
<span class='event_date'>{start_date:date(%H:%i)} - {end_date:date(%H:%i)}</span><br/>
<% } else { %>
<span class='event_date'>{start_date:date(%H:%i)}</span>
<% } %>
<span>{text}</span>
<br>
<div style=""padding-top:5px;"">
Duration: about <b><%= Math.ceil((ev.end_date - ev.start_date) / (60 * 60 * 1000)) %></b> hours
</div>
</div>";
Â
sched.Templates.EventBox = evBox;
return View(sched);
}
Note, the same result can be achieved with the client-side library. You can read more on the topic in the related article of dhtmlxScheduler documentation - Custom Event's Box.