Search code examples
javascriptxmlasp.net-mvc-4dhtmlx

Scheduler.load() doesn't work


I instance sheduler GPL V.3 in MVC 4, the CRUD function works perfectly but the method load doesn't work properly..

I have this code in my View

scheduler.config.xml_date = "%m/%d/%Y %H:%i";
scheduler.init('test', new Date(), "month");
scheduler.load('@Url.Action("Data","Home")');

The scheduler read the action and view but don't show anything in the calendar...

What a missing?

Thanks you for your help

My XML Data is well formated

enter image description here

There is my View Code

@model dynamic

@{
    Response.ContentType = "text/xml";
}
<data>
@foreach (var myevent in Model)
{
    <event id="@myevent.id">
        <text><![CDATA[@myevent.text]]></text>
        <start_date>@String.Format("{0:MM/dd/yyyy HH:mm}", myevent.start_date)</start_date>
        <end_date>@String.Format("{0:MM/dd/yyyy HH:mm}", myevent.end_date)</end_date>
    </event>
}
</data>

Solution

  • The Error for this issues is the format xml and data present. I changed my format to

    scheduler.config.xml_date = "%d-%m-%Y %H:%i";
    

    and work perfectly