Feb 24, 2009, 6:26 AM
Problem with disable dates, when using culture setting
Hi I cant get this simple sample code to work. Any ideas?
<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!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 id="Head1" runat="server">
<script type="text/javascript">
</script>
<title></title>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
//Sets the culture on the page
string strCulture = "da-DK";
Page.Culture = strCulture;
System.Globalization.CultureInfo ciCulture = new System.Globalization.CultureInfo(strCulture, true);
ScriptManager1.Locale = ciCulture;
//--
string[] strDisabledDates = new string[1];
strDisabledDates[0] = DateTime.Now.AddDays(1).ToShortDateString();
dpDatePicker.DisabledDates = strDisabledDates;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ScriptManager ID="ScriptManager1" runat="server">
</ext:ScriptManager>
<ext:DatePicker runat="server" ID="dpDatePicker"></ext:DatePicker>
</form>
</body>
</html>
Thanks!/Mikael