I have used RadCalendar to display specify dates. Appointment is a object with propertes : StartTime and EndTime
In codebehind, i used event DayRender to display dates between StartTime and EndTime each of appointment.
With only some appointment, RadCalendar still load so slow.
Sorry my bad english.
Here my code:
ascx.vb
ascx
In codebehind, i used event DayRender to display dates between StartTime and EndTime each of appointment.
With only some appointment, RadCalendar still load so slow.
Sorry my bad english.
Here my code:
ascx.vb
Protected Sub RadCalendar1_DayRender(ByVal sender As Object, ByVal e As DayRenderEventArgs) Handles RadCalendar1.DayRender
Dim Specificdate As DateTime = e.Day.Date
Dim flag = False
Dim lst As List(Of AIAppointmentInfo) = ctlAIAppointment.GetByUserId(UserInfo.UserID)
For Each obj As AIAppointmentInfo In lst
If flag = False Then
If Specificdate >= obj.StartTime And Specificdate <= obj.EndTime Then
e.Cell.CssClass = "SpecificDay"
flag = True
ElseIf Specificdate.Day = obj.StartTime.Day And Specificdate.Month = obj.StartTime.Month And Specificdate.Year = obj.StartTime.Year Then
e.Cell.CssClass = "SpecificDay"
flag = True
End If
End If
Next
End Sub
<
telerik:RadCalendar
runat
=
"server"
ID
=
"RadCalendar1"
Skin
=
"Hay"
AutoPostBack
=
"False"
EnableMultiSelect
=
"false"
DayNameFormat
=
"FirstTwoLetters"
EnableNavigation
=
"true"
EnableMonthYearFastNavigation
=
"false"
IsTodayHighlighted
=
"true"
>
<
SpecialDays
>
<
telerik:RadCalendarDay
Repeatable
=
"Today"
Date
=
""
ItemStyle-CssClass
=
"rcToday"
/>
</
SpecialDays
>
</
telerik:RadCalendar
>