Ajax calendar - how to change language?

S

staeri

I have the standard Ajax calendar, like this:

<cc1:calendarextender targetcontrolid="txtOrderDate" format="yyyy-MM-
dd" runat="server"></cc1:calendarextender>

<asp:TextBox ID="txtOrderDate" Text='<%# Bind("OrderDate") %>'
runat="server" CssClass="textGrey11"></asp:TextBox>

1. How can I change the language to Swedish in the calendar?
2. After postback the date in txtOrderdate is shown as: 2008-01-19
00:00, I just want to show 2008-01-19. How can that be done?

Very grateful for help!

// S
 
M

Milosz Skalecki [MCAD]

Hi there,



<%@ Page Language="C#" Culture="sv-SE" AutoEventWireup="true"
CodeFile="Default4.aspx.cs"
Inherits="Default4" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager runat="server" ID="manager"
EnableScriptLocalization="true" EnableScriptGlobalization="true" />
<asp:TextBox ID="txtOrderDate" runat="server" />
<cc1:CalendarExtender ID="ce" runat="server" Enabled="True"
TargetControlID="txtOrderDate"
OnClientDateSelectionChanged="function(sender, e) { sender.hide(); }"
Format="yyyy-MM-dd">
</cc1:CalendarExtender>
</div>
</form>
</body>
</html>

Note following attributes:

- <%@ Page %> directive: Culture="sv-SE"
- ScripManager: EnableScriptLocalization="true"
EnableScriptGlobalization="true"
- CalendarExtender : Format="yyyy-MM-dd"

Hope it helps
 
S

staeri

Thank you very much for the help!

The language was changed in the calender, except for "Today" at the
bottom of the calendar. How can that also be changed?

After postback the date in txtOrderdate is still shown as: 2008-01-19
00:00, I just want to show 2008-01-19. How can that be done?

Best regards,

S
 
M

Milosz Skalecki [MCAD]

What version of AjaxControlToolkit are you using? Make sure you've updated to
the latest release. "Today" problem may be related to lack of satelite
assebly with Swedish language.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top