Ajax calendar - how to change language?

Discussion in 'ASP .Net' started by staeri@gmail.com, Jan 19, 2008.

  1. Guest

    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
     
    , Jan 19, 2008
    #1
    1. Advertising

  2. 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
    --
    Milosz


    "" wrote:

    > 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
    >
     
    Milosz Skalecki [MCAD], Jan 19, 2008
    #2
    1. Advertising

  3. Guest

    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

    On 19 Jan, 16:46, Milosz Skalecki [MCAD] <>
    wrote:
    > 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
    > --
    > Milosz
    >
    >
    >
    > "" wrote:
    > > 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- Dölj citerad text -

    >
    > - Visa citerad text -
     
    , Jan 20, 2008
    #3
  4. 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.
    --
    Milosz


    "" wrote:

    > 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
    >
    > On 19 Jan, 16:46, Milosz Skalecki [MCAD] <>
    > wrote:
    > > 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
    > > --
    > > Milosz
    > >
    > >
    > >
    > > "" wrote:
    > > > 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- Dölj citerad text -

    > >
    > > - Visa citerad text -

    >
    >
     
    Milosz Skalecki [MCAD], Jan 20, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shevek
    Replies:
    3
    Views:
    6,047
    Shevek
    Jun 23, 2004
  2. minnie
    Replies:
    1
    Views:
    704
    Andrew Thompson
    Dec 13, 2006
  3. Marin
    Replies:
    1
    Views:
    679
    Juan T. Llibre
    Jan 10, 2008
  4. Suganya
    Replies:
    0
    Views:
    449
    Suganya
    Apr 29, 2008
  5. Marin

    Change language in Calendar control

    Marin, Jan 10, 2008, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    279
    Juan T. Llibre
    Jan 10, 2008
Loading...

Share This Page