Currently, I am creating calendars at runtime with my application. below is the code that I am using to do this...
Dim newCalendar As New Telerik.Web.UI.RadCalendar
newCalendar.Skin = "WebBlue"
newCalendar.RowHeaderText = " "
newCalendar.AutoPostBack = True
newCalendar.PresentationType = UI.Calendar.PresentationType.Preview
'fill the calendar with other information associated with the user
'get selected dates
Dim dtUserCalendar As DataTable = oDB.GetUserSpecificCalendar(dtCalendars.Rows(intloop).Item("EmpID"))
For intloop2 As Integer = 0 To dtUserCalendar.Rows.Count - 1
Dim dateTasks() As Date = GetDateArray(dtUserCalendar.Rows(intloop2).Item("Start"), dtUserCalendar.Rows(intloop2).Item("End"))
For intloop3 As Integer = 0 To dateTasks.Length - 1
Dim userDate As New Telerik.Web.UI.RadDate
userDate.Date = dateTasks(intloop3)
newCalendar.SelectedDates.Add(userDate)
Next
Next
When I create the calendar, I want all days the user is busy to be highlighted. This code will do this just fine. The problem that I am having is when a user enters in a recurring event. For example, if the user enters in a recurring event to start on October 1st and it occurs once every week from that point on, my calendar will only highlight October 1st and not any of the other days that the appointment is scheduled to happen on. Is this even possible to do with the Calendar control? If so, what do I need to do to get it to work for me.
Thanks.
Dim newCalendar As New Telerik.Web.UI.RadCalendar
newCalendar.Skin = "WebBlue"
newCalendar.RowHeaderText = " "
newCalendar.AutoPostBack = True
newCalendar.PresentationType = UI.Calendar.PresentationType.Preview
'fill the calendar with other information associated with the user
'get selected dates
Dim dtUserCalendar As DataTable = oDB.GetUserSpecificCalendar(dtCalendars.Rows(intloop).Item("EmpID"))
For intloop2 As Integer = 0 To dtUserCalendar.Rows.Count - 1
Dim dateTasks() As Date = GetDateArray(dtUserCalendar.Rows(intloop2).Item("Start"), dtUserCalendar.Rows(intloop2).Item("End"))
For intloop3 As Integer = 0 To dateTasks.Length - 1
Dim userDate As New Telerik.Web.UI.RadDate
userDate.Date = dateTasks(intloop3)
newCalendar.SelectedDates.Add(userDate)
Next
Next
When I create the calendar, I want all days the user is busy to be highlighted. This code will do this just fine. The problem that I am having is when a user enters in a recurring event. For example, if the user enters in a recurring event to start on October 1st and it occurs once every week from that point on, my calendar will only highlight October 1st and not any of the other days that the appointment is scheduled to happen on. Is this even possible to do with the Calendar control? If so, what do I need to do to get it to work for me.
Thanks.