Scheduler and Lightswitch Html

Hello,

I try to use scheduler control with Lightswitch Html Visual Studio project.
I have created a custom control in Lightswitch and in render code I try to initialize a scheduler code bellow but control not rendering right:


After press any button from navigation control is rendering OK;


Any ideeas how to fix it ?

$(element).append(“

”);
$(‘#myscheduler’).append(“
”);
$(‘#myscheduler’).append(“
”);
$(‘#myscheduler’).append(“
”);
$(‘#dhx_cal_navline’).append(“
 
”);
$(‘#dhx_cal_navline’).append(“
 
”);
$(‘#dhx_cal_navline’).append(“
”);
$(‘#dhx_cal_navline’).append(“
”);

scheduler.init('myscheduler', new Date(2009, 4, 25), "week");


a) try to change the size of container to some fixed value, if it helps, then problem is in parent container size, which is equal to zero in moment of initialization.

b) you can try to delay the scheduler’s initialization a bit

window.setTimeout(function(){
scheduler.init(‘myscheduler’, new Date(2009, 4, 25), “week”);
} ,50); //must be enough to render scheduler after all other content is rendered.