You can switch dates using .commandCallBack() method:
MVC View
<div class="note">
<a href="javascript:dp.commandCallBack('previous');">Previous</a> |
<a href="javascript:dp.commandCallBack('today');">Today</a> |
<a href="javascript:dp.commandCallBack('next');">Next</a>
</div>
Handle OnCommand event on the server side:
MVC Controller
protected override void OnCommand(CommandArgs e)
{
switch (e.Command)
{
case "previous":
StartDate = StartDate.AddMonths(-1);
Update(CallBackUpdateType.Full);
break;
case "next":
StartDate = StartDate.AddMonths(1);
Update(CallBackUpdateType.Full);
break;
case "today":
StartDate = DateTime.Today;
Update(CallBackUpdateType.Full);
break;
}
}
See also the documentation for the Pro version, it works the same way:
CommandCallBack
http://doc.daypilot.org/month/commandcallback/
Next/Previous Navigation
http://doc.daypilot.org/month/next-and-previous-buttons/
You need to upgrade to version 1.3.400 (the previous version has a bug in DayPilot.Month.commandCallBack()).
Demo:
http://mvc.daypilot.org/demo/Lite/Month/NextPrevious