This new tutorial shows how to create a toolbar for switching the event calendar views (day, week, month):
It uses a simple JavaScript helper (DayPilot.Switcher) to integrate the views (which are created using DayPilot Calendar and Month controls) with the toolbar and the Navigator control.
<script type="text/javascript"> var switcher = null; $(document).ready(function () { switcher = new DayPilot.Switcher(); // dp_day is ClientObjectName of DayPilotCalendarDay switcher.addButton("toolbar_day", dp_day); // dp_week is ClientObjectName of DayPilotCalendarWeek switcher.addButton("toolbar_week", dp_week); // dp_month is ClientObjectName of DayPilotMonth1 switcher.addButton("toolbar_month", dp_month); // dp_navigator is ClientObjectName of DayPilotNavigator1 switcher.addNavigator(dp_navigator); switcher.show(dp_day); }); </script>
A sample project is available for download.
See also a similar tutorial for ASP.NET MVC: