This is a migrated thread and some comments may be shown as answers.
RadCalendar.SelectedDate is not working
2 Answers 144 Views
This is a migrated thread and some comments may be shown as answers.
Venkata
Top achievements
Rank 1
Venkata asked on 01 Feb 2011, 10:59 PM
Hi,
i have a RadCalendar control on my page.
I am trying to set a RadCalendar selected date as March 15, 2011
but always shows February month
what i am doing wrong..?

here is my code
<telerik:RadCalendar runat="server" ID="RadCalendar1" ShowOtherMonthsDays="false" 
      EnableMonthYearFastNavigation="true" AutoPostBack="true">
</telerik:RadCalendar>

protected void Page_Load(object sender, EventArgs e)
  {          
     RadCalendar1.SelectedDate = DateTime.Parse("2011-03-15 11:02:00.000");
     //RadCalendar1.SelectedDate = DateTime.Parse("03/15/2011");
  }


can any one help me?

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 02 Feb 2011, 05:54 AM
Hello Venkata Maddineni,

In order to achieve your requirement, you need to set the FocusedDate property along with the SelctedDate property. Check out the following code.

C#:
RadCalendar1.SelectedDate = DateTime.Parse("2011-03-15 11:02:00.000");
RadCalendar1.FocusedDate= RadCalendar1.SelectedDate;

Thanks,
Shinu.
0
Venkata
Top achievements
Rank 1
answered on 02 Feb 2011, 05:46 PM
Thanks ..working..
Asked by
Venkata
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Venkata
Top achievements
Rank 1
Share this question
or