RadDateInput supports a wide range of date formats and cultures. You can change the culture dropdown and see the effect on RadDateInput.
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
<%@ 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 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 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>
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.