void imbNext_Click(object sender, ImageClickEventArgs e) { switch (CalendarCtrl.ViewType) { case CalendarViewType.MultiDay: if (CalendarCtrl.ViewMode == ViewModeType.Day) { CalendarCtrl.SelectedDate = CalendarCtrl.SelectedDate.AddDays(1); } if (CalendarCtrl.ViewMode == ViewModeType.WorkWeek || CalendarCtrl.ViewMode == ViewModeType.Week) { CalendarCtrl.SelectedDate = CalendarCtrl.SelectedDate.AddDays(7); } break; case CalendarViewType.Month: CalendarCtrl.SelectedDate = CalendarCtrl.SelectedDate.AddMonths(1); break; case CalendarViewType.Year: CalendarCtrl.SelectedDate = CalendarCtrl.SelectedDate.AddYears(1); break; default: break; } _pc["AjaxCal_SelDate"] = CalendarCtrl.SelectedDate.ToString(CultureInfo.InvariantCulture); CalendarCtrl.Refresh(); UpdateTodayButton(); }
void dtcWeek_ValueChange(object sender, EventArgs e) { CalendarCtrl.SelectedDate = dtcWeek.SelectedDate; _pc["AjaxCal_SelDate"] = CalendarCtrl.SelectedDate.ToString(CultureInfo.InvariantCulture); CalendarCtrl.Refresh(); UpdateTodayButton(); }