<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title></title>
<script runat="server">
protected override void InitializeCulture()
{
System.Globalization.
CultureInfo cultureInfo =
(System.Globalization.
CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone();
cultureInfo.DateTimeFormat.ShortDatePattern =
"d MMM yy";
try
{
System.Threading.
Thread.CurrentThread.CurrentCulture = cultureInfo;
}
catch
{
}
base.InitializeCulture();
}
</script>
</
head>
<
body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="sscriptmgr" runat="server">
</telerik:RadScriptManager>
<div>
<telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server">
</telerik:RadDateTimePicker>
</div>
</form>
</
body>
</
html>
Error happened when a date or time is selected from the calendar.
I need to initialize the CultureInfo because I need to control the displayed DateTime format.
Your help is much apprepciated.
Edwin