RadMonthYearPicker - Telerik ASP.NET MonthYearPicker


Please enter your billing information










Demo Configurator

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

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

About RadMonthYearPicker for ASP.NET AJAX

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

RadMonthYearPicker and 90+ 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
  • Select months and years
  • Keyboard navigation.
  • Visual Appeal - ships with rich set of skins for easy and consistent styling.

More about RadMonthYearPicker for ASP.NET AJAX
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
<%@ Page CodeFile="DefaultCS.aspx.cs" Language="c#" AutoEventWireup="true" Inherits="Telerik.Web.Examples.Calendar.MonthYearPicker.FirstLook.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ 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">
    <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" />
    <script type="text/javascript">
        function pageLoad() {
            $telerik.$(".container a").click(function () {
                $telerik.$(".container a").removeClass("active");
                $telerik.$(this).addClass("active");
            })
        };
    </script>
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ConfigurationPanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadMonthYearPicker1" UpdatePanelRenderMode="Inline" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="ConfigurationPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <div class="demo-container size-thin" runat="server" id="containerDiv">
        <div class="header"><br /><asp:Label ID="Label3" runat="server" Text="Please enter your billing information"  CssClass="title"></asp:Label></div>
        <div class="container">
            <asp:Label ID="Label1" runat="server" AssociatedControlID="RadNumericTextBox1" Text="CardType" CssClass="cardLabel"></asp:Label>
            <a href="#" class="card maestro active"></a>
            <a href="#" class="card mastercard"></a>
            <a href="#" class="card visa"></a>
            <a href="#" class="card visaelectron"></a>
            <br />
            <br />
            <telerik:RadNumericTextBox RenderMode="Lightweight" runat="server" ID="RadNumericTextBox1" MaxLength="10" LabelWidth="87px" Label="Card number" Width="325px"></telerik:RadNumericTextBox>
            <br />
            <br />
            <asp:Label ID="Label2" runat="server" Text="Expires on" CssClass="cardLabel" AssociatedControlID="RadMonthYearPicker1"></asp:Label><telerik:RadMonthYearPicker RenderMode="Lightweight" ID="RadMonthYearPicker1" runat="server" Width="238px">
            </telerik:RadMonthYearPicker>
            <br />
            <br />
            <telerik:RadNumericTextBox RenderMode="Lightweight" ID="RadNumericTextBox2" MaxLength="3" NumberFormat-KeepNotRoundedValue="true" NumberFormat-AllowRounding="false" runat="server" LabelWidth="87px" Label="CVV" Width="170px"></telerik:RadNumericTextBox>
            <br />
            <br />
            <hr class="demo-separator" />
            <br />
            <telerik:RadButton RenderMode="Lightweight" ID="RadButton1" runat="server" Text="Ok" Width="87px"></telerik:RadButton>
            <telerik:RadButton RenderMode="Lightweight" ID="RadButton2" runat="server" Text="Cancel" Width="87px"></telerik:RadButton>
        </div>
    </div>

    <qsf:ConfiguratorPanel ID="ConfigurationPanel1" runat="server" Orientation="Vertical">
        <Views>
            <qsf:View Title="Date Settings">
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server" Size="Medium">
                    <ul class="fb-group">
                        <li>
                            <qsf:DatePicker Label="MinDate" ID="rdpMinDate" runat="server" Size="Medium" AutoPostBack="true"
                                DateInput-EmptyMessage="MinDate" MinDate="01/01/1000" MaxDate="01/01/3000">
                            </qsf:DatePicker>
                            <qsf:DatePicker Label="MaxDate" ID="rdpMaxDate" runat="server" Size="Medium" AutoPostBack="true"
                                DateInput-EmptyMessage="MaxDate" MinDate="01/01/1000" MaxDate="01/01/3000">
                            </qsf:DatePicker>
                        </li>
                        <li>
                            <qsf:ComboBox ID="rcbDateFormat" Label="DateFormat" Size="Narrow" runat="server" AllowCustomText="false" AutoPostBack="true">
                                <Items>

                                    <telerik:RadComboBoxItem Text="MMMM/yyyy" Value="MMMM/yyyy"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="MM/yyyy" Value="MM/yyyy" Selected="true"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="yyyy" Value="yyyy"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Text="MMMM" Value="MMMM"></telerik:RadComboBoxItem>
                                </Items>
                            </qsf:ComboBox>
                        </li>
                    </ul>
                </qsf:ConfiguratorColumn>
            </qsf:View>
            <qsf:View Title="Popup Settings">
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn2" runat="server" Size="Medium">
                    <ul class="fb-group">
                        <li>
                            <qsf:ComboBox runat="server" Label="Popup expand direction" ID="ddlPopupDirection" AutoPostBack="True" Size="Auto" OnSelectedIndexChanged="ddlPopupDirection_SelectedIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Value="BottomRight" Text="BottomRight(default)"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Value="BottomLeft" Text="BottomLeft"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Value="TopRight" Text="TopRight"></telerik:RadComboBoxItem>
                                    <telerik:RadComboBoxItem Value="TopLeft" Text="TopLeft"></telerik:RadComboBoxItem>
                                </Items>
                            </qsf:ComboBox>
                        </li>
                        <li>
                            <qsf:TextBox ID="riTooltip" runat="server" AutoPostBack="true" Label="Tooltip Text"
                                SelectionOnFocus="SelectAll" Size="Auto">
                            </qsf:TextBox></li>
                    </ul>
                </qsf:ConfiguratorColumn>
                <qsf:ConfiguratorColumn ID="ConfiguratorColumn3" runat="server" Size="Auto">
                    <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">
                            <asp:CheckBox ID="chkShowPopupOnFocus" runat="server" Checked="true" AutoPostBack="true"
                                Text="Show popup on textbox focus"></asp:CheckBox></span></li>
                        <li><span class="checkbox">
                            <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>

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

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?