CalendarExtender and Globalisation

By default the CalendarExtender isn’t aware of the Globalisation settings. Example:

<asp:TextBox ID="txtFrom" runat="server" Width="80px"></asp:TextBox>
<cc1:CalendarExtender ID="txtFrom_CalendarExtender" runat="server" TargetControlID="txtFrom" ClearTime="True">
</cc1:CalendarExtender>

Web.config:

<system.web>

[ … ]

<globalization uiCulture="nl-BE" culture="nl-BE" />

</system.web>

This will still not use the nl-BE culture. To get it working you must add the EnableScriptGlobalization="True" to the ScriptManager that you’re using.

<asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="True">
</asp:ScriptManager>

Source: http://forums.asp.net/p/1068187/1589941.aspx

 

Advertisement

About Gaston

MCT, MCSD, MCDBA, MCSE, MS Specialist
This entry was posted in Geen categorie. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s