How change culture ONLY for calendarextender?

Last post 01-10-2008 10:30 AM by DisturbedBuddha. 3 replies.

Sort Posts:

  • How change culture ONLY for calendarextender?

    01-10-2008, 6:39 AM
    • Loading...
    • zipfeli
    • Joined on 08-07-2005, 4:07 PM
    • Posts 95

    Hi

    Is it possible to change language (days,month etc.) ONLY for calendar extender control, without changing culture for complete page?

  • Re: How change culture ONLY for calendarextender?

    01-10-2008, 9:26 AM

    No, but what you can do is place the textbox in an updatepanel, set AutoPostBack="true" for the textbox, and in the server-side TextBox_TextChanged event, format it however you'd like. 

        Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
            Dim TextDate As Date = CDate(TextBox1.Text)
            TextBox1.Text = TextDate.ToString("MMM dd, yyyy")
        End Sub
     
    When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


    My latest ASP.NET AJAX blog entries.
  • Re: How change culture ONLY for calendarextender?

    01-10-2008, 10:24 AM
    • Loading...
    • zipfeli
    • Joined on 08-07-2005, 4:07 PM
    • Posts 95

    Thank you, but maybe I ask different: I want the popup calendar showing up in different languages.

  • Re: How change culture ONLY for calendarextender?

    01-10-2008, 10:30 AM
    Answer

    Oh, then no.  The calendar is strictly based on the globalization settings for your application.

    When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


    My latest ASP.NET AJAX blog entries.
Page 1 of 1 (4 items)
Microsoft Communities
Page view counter