描画は、eventArgs のプロパティを使用して編集できます。デフォルトの描画は、キャンセルできます。また、アプリケーションはカスタム描画を実装できます。
WebMonthCalendar1.ClientEvents.RenderDay = "WebMonthCalendar1_RenderDay"
WebMonthCalendar1.ClientEvents.RenderDay = "WebMonthCalendar1_RenderDay";
// The client event 'RenderDay' takes two parameters sender and e // sender is the object which is raising the event // e is the CalendarRenderDayEventArgs function WebMonthCalendar1_RenderDay(sender, e) { //Gets the day object var day = e.get_day(); //Gets value of the index within the grid of the calendar var index = day.get_index(); //--------------------- // customize style.color of TD element var color = ''; if (index < 7 || index == 42) color = '#d00000'; else if (index < 14 || index == 43) color = '#d0d000'; else if (index < 21 || index == 44) color = '#00d000'; else if (index < 28 || index == 45) color = '#00c0c0'; else if (index < 35 || index == 46) color = '#d000d0'; else if (index < 42 || index == 47) color = '#0000c0'; //--------------- // This will permanently affect all days in calendar and override all possible css classes day.get_element().style.color = color; }