Hi Dan,
I have done the POC using Javascript version of Daypilot. But at the time of event rendering event is not displaying from the database.
I have used the following code to bind data.
public ActionResult Events(DateTime? start, DateTime? end)
{
var events = getdata();
var result = events
.Select(e => new JsonEvent()
{
start = e.start.ToString("s"),
end = e.end.ToString("s"),
text = e.name,
id = e.id.ToString()
})
.ToList();
return new JsonResult { Data = result };
}
But if I am doing the event creation at the time of initialization of the dp then the event is displaying
<script type="text/javascript">
var dp = new DayPilot.Calendar("dp");
dp.viewType = "Week";
dp.events.list = [
{
"id": "5",
"text": "Calendar Event 5",
"start": "2015-10-05T10:30:00",
"end": "2015-10-05T16:30:00",
"backColor": "red"
}];
dp.init();
</script>
Can you please let me what i am missing at the time of getting data from backend.
Regards
Manish