This is a migrated thread and some comments may be shown as answers.

RadCalendar based on the specific month

4 Answers 43 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Brown
Top achievements
Rank 1
Brown asked on 13 Jan 2011, 03:53 PM
Hi 

 I am having drop down list in my page has all the month names.
If i click on the month based on that rad calendar should display..
Could you please tell me how to do?

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Jan 2011, 07:32 AM
Hello Brown,


You could do this from client side. Check the code shown below.

client code:
function selectMonth() {
    var dropDown = document.getElementById("DropDownList1");
    for (var index = 0; index < dropDown.length; index++) {
        if (dropDown[index].selected == true) {
            var calendar = $find('<%=RadCalendar3.ClientID  %>');
            var triplet = [2011, dropDown[index].value, 1];
            calendar.navigateToDate(triplet);             
            break;
        }
    }
}

and ASPX:
<telerik:RadCalendar ID="RadCalendar3" runat="server">
</telerik:RadCalendar>
<br />
<asp:DropDownList ID="DropDownList1" runat="server" onchange="selectMonth();">
    <asp:ListItem Text="January" Value="1"></asp:ListItem>
    <asp:ListItem Text="February" Value="2"></asp:ListItem>
    <asp:ListItem Text="March" Value="3"></asp:ListItem>
    <asp:ListItem Text="April" Value="4"></asp:ListItem>
        . . .
</asp:DropDownList>



-Shinu.
0
Brown
Top achievements
Rank 1
answered on 14 Jan 2011, 01:08 PM
Hi Shinu,, i tried this code. i think that $find is Jquery? it is showing error on my page while executing : is expected.....
0
Maria Ilieva
Telerik team
answered on 18 Jan 2011, 04:34 PM
Hi Brown,

The $find method provides a shortcut to the findComponent method of the Sys.Application class. Refer to the link below for more information on this matter:
http://msdn.microsoft.com/en-us/library/bb397441.aspx.

Also please find attached a sample application which works correctly using Shinu's code.

Best wishes,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Maria Ilieva
Telerik team
answered on 18 Jan 2011, 04:35 PM
Hi Brown,

The $find method provides a shortcut to the findComponent method of the Sys.Application class. Refer to the link below for more information on this matter:
http://msdn.microsoft.com/en-us/library/bb397441.aspx.

Also please find attached a sample application which works correctly using Shinu's code.

Best wishes,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Calendar
Asked by
Brown
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Brown
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or