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

WebForms DatePicker Overview

Current Account Statements
*max period length â€" 31 days
  • Demo Configurator

This demo illustrates the RadDatePicker for ASP.NET AJAX control.

About RadDatePicker for ASP.NET AJAX

RadDatePicker control is a highly configurable component for displaying and selecting date values. The datepicker facilitates the interaction between the user and your web site and saves you a lot of client-side scripting. Features include adjacent calendar preview, month year fast navigation, context menus, a set of built-in skins and many more.

RadDatePicker and 120+ other controls are part of UI for ASP.NET AJAX, a comprehensive toolset taking care of the common functionality of your application, while leaving you with more time to work on its business logic.

Key Features

  • Flexible client-side API
  • The ability to define special days for per-day customization.
  • Keyboard navigation.
  • Visual Appeal - ships with rich set of skins for easy and consistent styling.

More about RadDatePicker for ASP.NET AJAX
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page CodeFile="DefaultVB.aspx.vb" Language="vb" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Calendar.Functionality.CustomDatePicker.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">

            //<![CDATA[

            function OnDateSelected(sender, eventArgs) {
                var date1 = sender.get_selectedDate();
                date1.setDate(date1.getDate() + 31);
                var datepicker = $find("<%= RadDatePicker2.ClientID %>");
                datepicker.set_maxDate(date1);
            }


            //]]>
        </script>

    </telerik:RadScriptBlock>
    <telerik:RadFormDecorator RenderMode="Lightweight" runat="server" DecorationZoneID="containerDiv"></telerik:RadFormDecorator>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ConfigurationPanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="containerDiv" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="ConfigurationPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <span class="header"><em></em><span>Current Account Statements</span></span>
    <div class="demo-container size-thin" runat="server" id="containerDiv">
        <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" Label="Account" Width="100%">
            <Items>
                <telerik:RadComboBoxItem Text="BG87ABCD123456BGIKLMNP BGN" />
                <telerik:RadComboBoxItem Text="BG56HGTY98765BGPOLIMNS BGN" />
            </Items>
        </telerik:RadComboBox>
        <telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker1" Width="50%" ClientEvents-OnDateSelected="OnDateSelected" runat="server" DateInput-Label="From Date">
        </telerik:RadDatePicker>
        <telerik:RadDatePicker RenderMode="Lightweight" ID="RadDatePicker2" CssClass="toDate" Width="50%" runat="server" DateInput-Label="To Date">
        </telerik:RadDatePicker>
        <small>*max period length – 31 days</small>
        <hr class="demo-separator" />

        <telerik:RadButton RenderMode="Lightweight" ID="RadButton1" runat="server" Text="Search" Width="90px"></telerik:RadButton>
    </div>
    <asp:Panel ID="Panel1" runat="server">
        <qsf:ConfiguratorPanel ID="ConfigurationPanel1" runat="server" Orientation="Vertical"
            Expanded="true">
            <Views>
                <qsf:View Title="Localization">
                    <qsf:ConfiguratorColumn ID="ConfiguratorColumn6" runat="server" Size="Wide">
                        <ul class="fb-group">
                            <li>
                                <qsf:ComboBox ID="rcbCulture" runat="server" AllowCustomText="false" Label="Choose Language" AutoPostBack="true" Size="Medium">
                                    <Items>
                                        <telerik:RadComboBoxItem Value="en-US" Text="English"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="de-DE" Text="German"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="fr-FR" Text="French"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="af-ZA" Text="Afrikaans - South Africa"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="sq-AL" Text="Albanian - Albania"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="hy-AM" Text="Armenian - Armenia"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="be-BY" Text="Belarusian - Belarus"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="bg-BG" Text="Bulgarian - Bulgaria"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="ca-ES" Text="Catalan - Catalan"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="hr-HR" Text="Croatian - Croatia"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="cs-CZ" Text="Czech - Czech Republic"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="da-DK" Text="Danish - Denmark"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="nl-BE" Text="Dutch - Belgium"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="nl-NL" Text="Dutch - The Netherlands"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="en-AU" Text="English - Australia"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="en-CA" Text="English - Canada"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="fr-FR" Text="French - France"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="hu-HU" Text="Hungarian - Hungary"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="ro-RO" Text="Romanian - Romania"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="sw-KE" Text="Swahili - Kenya"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="sv-FI" Text="Swedish - Finland"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="sv-SE" Text="Swedish - Sweden"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Value="tt-RU" Text="Tatar - Russia"></telerik:RadComboBoxItem>
                                    </Items>
                                </qsf:ComboBox>
                            </li>

                        </ul>
                    </qsf:ConfiguratorColumn>
                </qsf:View>
                <qsf:View Title="Popup Settings">

                    <qsf:ConfiguratorColumn ID="ConfiguratorColumn3" runat="server" Size="Narrow">
                        <ul class="fb-group">
                            <li>

                                <qsf:ComboBox ID="rcbPopupAnimation" runat="server" AutoPostBack="true" Label="Popup animation" AllowCustomText="false" Size="Medium">
                                    <Items>
                                        <telerik:RadComboBoxItem Text="Fade" Value="Fade" Selected="true"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Text="Slide" Value="Slide"></telerik:RadComboBoxItem>
                                    </Items>
                                </qsf:ComboBox>
                            </li>

                            <li>

                                <qsf:ComboBox ID="rcbPopupDirection" Label="Popup direction" AllowCustomText="false" Size="Medium" runat="server" AutoPostBack="true">
                                    <Items>
                                        <telerik:RadComboBoxItem Text="top left" Value="11"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Text="top right" Value="12"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Text="bottom left" Value="21"></telerik:RadComboBoxItem>
                                        <telerik:RadComboBoxItem Text="bottom right" Value="22" Selected="true"></telerik:RadComboBoxItem>
                                    </Items>
                                </qsf:ComboBox>
                            </li>

                        </ul>
                    </qsf:ConfiguratorColumn>
                    <qsf:ConfiguratorColumn ID="ConfiguratorColumn4" runat="server" Size="Narrow">
                        <ul class="fb-group">
                            <li>

                                <qsf:TextBox ID="riTooltip" runat="server" AutoPostBack="true" Label="Tooltip"
                                    Size="Wide">
                                </qsf:TextBox>
                            </li>

                            <li>

                                <qsf:NumericTextBox ID="tbDuration" runat="server" ShowSpinButtons="false" Label="Duration (ms)" AutoPostBack="true"
                                    DataType="System.Int32" Size="Wide">
                                    <NumberFormat AllowRounding="false" DecimalDigits="0"></NumberFormat>
                                </qsf:NumericTextBox>
                            </li>

                        </ul>
                    </qsf:ConfiguratorColumn>
                    <qsf:ConfiguratorColumn ID="ConfiguratorColumn2" runat="server" Size="Wide">
                        <ul class="fb-group">

                            <li>
                                <span class="checkbox">
                                    <asp:CheckBox runat="server" ID="chkEnableShadows" Checked="true" Text="Enable shadows"
                                        AutoPostBack="True" OnCheckedChanged="chkEnableShadows_CheckedChanged"></asp:CheckBox></span>
                            </li>
                            <li>
                                <span class="checkbox size-wide">
                                    <asp:CheckBox ID="chkShowButton" runat="server" Checked="true" AutoPostBack="true"
                                        Text="Show date popup button"></asp:CheckBox></span>
                            </li>
                            <li>
                                <span class="checkbox size-wide">
                                    <asp:CheckBox ID="chkShowPopupOnFocus" runat="server" Checked="true" AutoPostBack="true"
                                        Text="Show popup on textbox focus"></asp:CheckBox></span>
                            </li>
                            <li>
                                <span class="checkbox size-wide">
                                    <asp:CheckBox ID="chkEnableScreenBoundaryDetection" runat="server" Checked="true"
                                        AutoPostBack="true" Text="Enable screen boundary detection"></asp:CheckBox></span>
                            </li>
                        </ul>
                    </qsf:ConfiguratorColumn>
                </qsf:View>
            </Views>
        </qsf:ConfiguratorPanel>
    </asp:Panel>

    </form>
</body>
</html>

Support & Learning Resources

Find Assistance