I’m trying to load data to my scheduler from C# list like this:
<script type="text/javascript">
…
scheduler.init(“scheduler_here”);
@ foreach (var myevent in schedulerEvents)
{
scheduler.addEvent({
start_date: @ myevent.start_date,
end_date: @ myevent.end_date,
text: @ myevent.text;
});
};
}
…
schedulerEvents list contains object of this class:
public class SchedulerEvent
{
public DateTime start_date;
public DateTime end_date;
public String text;
public SchedulerEvent(DateTime start, DateTime end, String text)
{
this.start_date = start;
this.end_date = end.AddHours(1);//visit take always 1 hour
this.text = text;
}
}
Code compile but I have only partially initialized scheduler. I can’t even see this events. Only pagging arrows and “today” button are displayed. What is wrong? Please help me.