New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Keyboard Navigation

Navigation between dates with the arrow keys
May 2024

  • Demo Configurator
  • Command keyCtrl

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.

By default you can use Ctrl + Y to focus the control. With R3 2021 you can now focus the RadCalendar by specifying the FocusKey and CommandKey in the KeyboardNavigationSettings inner tag.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page CodeFile="DefaultCS.aspx.cs" Language="c#" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Calendar.Functionality.MultiMonthView.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>

    <style type="text/css">
        .image {
            margin-top: 12px;
            float: right;
            border: 1px solid #CCC;
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container no-bg" style="max-width: 900px" runat="server" id="containerDiv">
        <asp:Image CssClass="image" ImageUrl="images/keyboard_nav.gif"
            runat="server" AlternateText="Navigation between dates with the arrow keys"></asp:Image>
        <telerik:RadCalendar RenderMode="Lightweight" runat="server" ID="RadCalendar1" EnableKeyboardNavigation="true"
        <br />
        <br />
        <telerik:RadDatePicker RenderMode="Lightweight" runat="server" ID="RadDatePicker1">
            <Calendar ID="Calendar1" runat="server" EnableKeyboardNavigation="true">
        <br />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
            <telerik:AjaxSetting AjaxControlID="ConfigurationPanel1">
                    <telerik:AjaxUpdatedControl ControlID="ConfigurationPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadCalendar1" LoadingPanelID="RadAjaxLoadingPanel1" />

    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" />

    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            function validateFocusKey(source, arguments) {
                var maskedTextBox = $find("<%= RadMaskedTextBoxFocusKey.ClientID %>");
                var textBoxValue = maskedTextBox.get_textBoxValue().trim();

                if (textBoxValue.length != 1) {
                    arguments.IsValid = false;

                var keyCode = textBoxValue.charCodeAt(0);

                if (keyCode < 65 || keyCode > 90) {
                    arguments.IsValid = false;
                arguments.IsValid = true;

    <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1">
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Size="Wide">

                    <ul class="fb-group">
                            <qsf:DropDownList runat="server" ID="DropDownListCommandKey"
                                Label="Command key" />
                            <qsf:MaskedTextBox runat="server" ID="RadMaskedTextBoxFocusKey"
                                Label="Focus key" />
                            <asp:CustomValidator ID="CustomValidator1" runat="server"
                                Text="* Please type a valid uppercase Latin letter"
                                ClientValidationFunction="validateFocusKey" />


Support & Learning Resources

Find Assistance