Default scheduler.renderEvent javascript code

I was looking all over for an easy way to do this. After looking at the dhtmlxscheduler.js file I was able to rip out what was needed to get the default scheduler.renderEvent code for the frontend.

This is for the default dhtmlxscheduler_glossy.css style type

scheduler.renderEvent = function(container, ev) {
    var c_width = parseFloat(container.style.width);      
    var c_height = parseFloat(container.style.height);
    var html=""; 
    html+= "<div class='dhx_event_move dhx_header' style='width:"+(c_width - 2)+"px;'></div>";
    html += "<div class='dhx_event_move dhx_title'>"+scheduler.templates.event_header(ev.start_date, ev.end_date, ev)+"</div>";
    html += "<div class='dhx_body' style='width:"+(c_width - 10)+"px;height:"+(c_height - 29)+"px;'>" + scheduler.templates.event_text(ev.start_date, ev.end_date, ev) + "</div>";
    html += "<div class='dhx_event_resize dhx_footer' style='width:"+(c_width - 4)+"px;'></div>";
    container.innerHTML = html;
    return true;
};
1 Like

Hello,

Do what exactly?

Best regards,
Ilya

If your working with a very custom view, not even lightbox sections or anything it’s helpful.

The entire event CSS and text is editable right from a simple structured view on the front end.

With the proper pixels, margins, width, etc… that is not compiled as simply in dhtmlxscheduler.js