Im looking to mark biweekly dates on a cal to show pay days. This code works but it only shows on the current calendar how do I modify it so if the scroll thru the mutiple months those days show up as marked?
| Private Sub Page_Load(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs) Handles RadCalendar1.DayRender |
| startDate = CType(RadCalendar1.CalendarView, MonthView).MonthStartDate |
| endDate = CType(RadCalendar1.CalendarView, MonthView).MonthEndDate |
| Dim _Date As Date = "2009-09-11" |
| Do While _Date <= Now.AddYears(1) |
| DayOfMonth = _Date.Day |
| MonthMonth = _Date.Month |
| YearYear = _Date.Year |
| Dim CurrentDate As DateTime = e.Day.Date |
| If startDate <= CurrentDate And CurrentDate <= endDate Then |
| If CurrentDate.Day = DayOfMonth And CurrentDate.Month = MonthMonth And CurrentDate.Year Then |
| Dim currentCell As TableCell = e.Cell |
| currentCell.Style("background-color") = "green" |
| End If |
| End If |
| _Date = _Date.AddDays(14) |
| Loop |
| End Sub |
