HOWTO: Switch day/week/work week view
Applies to: DayPilotCalendar
Switching views
You can switch the day/work week/week view by just changing the StartDate and Days properties.
See also HOWTO: Determine first day of week.
Day view
DayPilotCalendar1.StartDate = DateTime.Today;
DayPilotCalendar1.Days = 1;
Work week view
DayPilotCalendar1.StartDate = DayPilot.Utils.Week.FirstWorkingDayOfWeek(DateTime.Today);
DayPilotCalendar1.Days = 5;
Week view
DayPilotCalendar1.StartDate = DayPilot.Utils.Week.FirstDayOfWeek(DateTime.Today);
DayPilotCalendar1.Days = 5;