Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Calendar / Keyboard navigation

Navigation between dates with the arrow keys



  • This example demonstrates the navigation between dates with the arrow keys into the RadCalendar and RadDatePicker controls. The navigation could be enabled with setting the EnableKeyboardNavigation property to true:

    <telerik:RadCalendar EnableKeyboardNavigation="true" EnableMultiSelect="false" runat="server" ID="RadCalendar1" />

    When the EnableKeyboardNavigation is set to true the user could navigate with:

    • Left arrow - moves one date left form the current date
    • Right arrow - moves one date right from the current date
    • Top arrow - moves one week before the current date
    • Bottom arrow - moves one week after the current date

    If the user presses the Enter key or spacebar key the date will be selected.
    Note that the EnableMultyDateSelecttion property of the calendar should be set to false.

    You can focus the calendar control with pressing CTRL + Y.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page CodeFile="DefaultVB.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="Telerik.Web.Examples.Calendar.Functionality.MultiMonthView.DefaultVB" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag runat="server" ID="Headtag1"></qsf:HeadTag>
    </head>
    <body class="BODY">
        <form runat="server" id="mainForm" method="post">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB"></qsf:Header>
        <telerik:RadScriptManager ID="RadScriptManager" runat="server" />
    <asp:Image ID="Image1" style="margin-top: 12px; float: right; border: 1px solid #CCC" ImageUrl="~/Calendar/Examples/Functionality/KeyboardNavigation/images/keyboard_nav.gif" runat="server"
    AlternateText="Navigation between dates with the arrow keys" />

        <telerik:RadDatePicker runat="server" ID="RadDatePicker1">
            <Calendar runat="server" EnableKeyboardNavigation="true">
            </Calendar>
        </telerik:RadDatePicker>
        <br />
        <br />
        <telerik:RadCalendar runat="server" ID="RadCalendar1" EnableKeyboardNavigation="true"
            EnableMultiSelect="false">
        </telerik:RadCalendar>
        <br />
        <qsf:Footer ID="Footer1" runat="server"></qsf:Footer>
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451