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

Input / First Look



Configurator
Empty message: Min Date:
Culture:
select
Max Date:
Date Format:
select
Keyboard increment:
Show Label: Mouse wheel increment:

  • RadDateInput supports a wide range of date formats and cultures. You can change the culture dropdown and see the effect on RadDateInput.

    The new 'smart parsing engine' allows you to enter not only digits along with separators for the date/time but even month names or dates/years in long/short date format. This gives the user the flexibility to enter the date in a format that suits him best. The technology for parsing the date exceeds the Microsoft Outlook date input control.

    Additionally you can restrict the date format which will be recognized by the date input via the DateFormat property of the control. The acceptable values are d for Short date, D for Lond date, f for Full date, custom format, etc.

    Moreover, you can define the culture of the displayed date in order to conform to a specific region format. This can be fine-tuned via the Culture property of RadDateInput

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="c#" CodeFile="DefaultCS.aspx.cs" AutoEventWireup="true" Inherits="Telerik.InputExamplesCS.RadDatePicker.FirstLook.DefaultCS" %>

    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!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>
        <!-- custom head section -->
        <style type="text/css">
            .module DT
            {
                float: left;
                width: 100px;
            }
            .module
            {
                line-height: 20px;
            }
        </style>
        <!-- end of custom head section -->
    </head>
    <body class="BODY">
        <form runat="server" id="mainForm" method="post">
        <qsf:Header runat="server" ID="Header1" NavigationLanguage="C#"></qsf:Header>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <!-- content start -->
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
            <telerik:RadDateInput ID="RadDateInput1" runat="server" Width="200px" Culture="bg-BG"
                InvalidStyleDuration="100" Label="Date:">
            </telerik:RadDateInput><br />
            <br />
            <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Title="Configurator"
                Orientation="Horizontal" Expanded="true">
                <table>
                    <tr>
                        <td>
                            Empty&nbsp;message:
                        </td>
                        <td style="width: 250px">
    <asp:TextBox runat="server" ID="TextBox1" AutoPostBack="true" Text="Set empty message"
    OnTextChanged="TextBox1_TextChanged">

                            </asp:TextBox>
                        </td>
                        <td>
                            Min Date:
                        </td>
                        <td>
                            <telerik:RadDatePicker ID="RadDatePicker1" runat="server" MinDate="1900-01-01" AutoPostBack="true"
                                OnSelectedDateChanged="RadDatePicker1_SelectedDateChanged">
                                <Calendar ID="Calendar1" RangeMinDate="1900-01-01" runat="server">
                                </Calendar>
                            </telerik:RadDatePicker>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Culture:
                        </td>
                        <td>
                            <telerik:RadComboBox AutoPostBack="true" Height="120px" Width="200px" runat="server"
                                ID="Combo1" OnSelectedIndexChanged="Combo1_SelectedIndexChanged">
                            </telerik:RadComboBox>
                        </td>
                        <td>
                            Max Date:
                        </td>
                        <td>
                            <telerik:RadDatePicker ID="RadDatePicker2" runat="server" MinDate="1900-01-01" AutoPostBack="true"
                                OnSelectedDateChanged="RadDatePicker2_SelectedDateChanged">
                                <Calendar ID="Calendar2" RangeMinDate="1900-01-01" runat="server">
                                </Calendar>
                            </telerik:RadDatePicker>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Date Format:
                        </td>
                        <td>
                            <telerik:RadComboBox AutoPostBack="true" runat="server" ID="Combo2" Width="200px"
                                OnSelectedIndexChanged="Combo2_SelectedIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="Short Date" Value="d" />
                                    <telerik:RadComboBoxItem Text="Long Date" Value="D" />
                                    <telerik:RadComboBoxItem Text="Short Time" Value="t" />
                                    <telerik:RadComboBoxItem Text="Long Time" Value="T" />
                                    <telerik:RadComboBoxItem Text="Full" Value="f" />
                                    <telerik:RadComboBoxItem Text="Custom - dd MMMM yyyy - dddd hh:mm" Value="dd MMMM yyyy - dddd hh:mm" />
                                </Items>
                            </telerik:RadComboBox>
                        </td>
                        <td>
                            Keyboard increment:
                        </td>
                        <td>
    <asp:CheckBox runat="server" ID="KeyboardIncrement" Checked="true" AutoPostBack="true"
    OnCheckedChanged="KeyboardIncrement_CheckedChanged" />

                        </td>
                    </tr>
                    <tr>
                        <td>
                            Show&nbsp;Label:
                        </td>
                        <td>
                            <asp:CheckBox runat="server" ID="CheckBox1" Checked="true" AutoPostBack="true" OnCheckedChanged="CheckBox1_CheckedChanged" />
                        </td>
                        <td>
                            Mouse wheel increment:
                        </td>
                        <td>
                            <asp:CheckBox runat="server" ID="MouseWheel" Checked="true" AutoPostBack="true" OnCheckedChanged="MouseWheel_CheckedChanged" />
                        </td>
                    </tr>
                </table>
            </qsf:ConfiguratorPanel>
        </telerik:RadAjaxPanel>
        <!-- content end -->
        <qsf:Footer runat="server" ID="Footer1"></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