Hi,
I am trying to change the month displayed with a button click in code-behind.
When I go back to February 2011 from March 2011 I can only see days from March 2011 although Focused Date is a date from February 2011.
Thank you...
I am trying to change the month displayed with a button click in code-behind.
<
telerik:RadCalendar
ID
=
"RadCalendar1"
runat
=
"server"
ShowOtherMonthsDays
=
"false"
></
telerik:RadCalendar
> <
br
/>
<
asp:LinkButton
ID
=
"LinkButton1"
runat
=
"server"
onclick
=
"LinkButton1_Click"
>Prev</
asp:LinkButton
> <
br
/>
<
asp:LinkButton
ID
=
"LinkButton2"
runat
=
"server"
onclick
=
"LinkButton2_Click"
>Next</
asp:LinkButton
>
protected
void
LinkButton1_Click(
object
sender, EventArgs e)
{
RadCalendar1.FocusedDate = RadCalendar1.FocusedDate.AddMonths(-1);
}
protected
void
LinkButton2_Click(
object
sender, EventArgs e)
{
RadCalendar1.FocusedDate = RadCalendar1.FocusedDate.AddMonths(1);
}
When I go back to February 2011 from March 2011 I can only see days from March 2011 although Focused Date is a date from February 2011.
Thank you...