RadDatePicker Calendar Year Problem

5 posts, 0 answers
  1. Kittipong Tangtanaporn
    Kittipong Tangtanaporn avatar
    7 posts
    Member since:
    Jan 2008

    Posted 04 Jun 2008 Link to this post

    Hi,

    I want the calendar to be displayed in Thai language with A.D. Year, so I set the RadDatepicker's culture to "Thai-Thailand" in aspx . The problem is that it shows calendar in B.E. (Buddhist Era) first time the calendar is poped up. Only after the user click on forward or backward navigation that the calendar year will be in A.D. format.
     
    Is it possible to make it show calendar year in A.D. format since the first time the calendar is poped up ?

    Any help would be much appreciated.

    Thankyou,

    Punthip
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 05 Jun 2008 Link to this post

    Hello Kittipong Tangtanaporn,

    Currently RadCalendar supports Gregorian calendar only. Take a look at this code library for a possible workaround.

    Greetings,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. oat
    oat avatar
    6 posts
    Member since:
    Oct 2006

    Posted 31 Jan 2009 Link to this post

    I got this problem too..
  5. Vishwanath
    Vishwanath avatar
    7 posts
    Member since:
    Sep 2007

    Posted 31 May 2010 Link to this post

    Override the culture init and set the  calender to

    GregorianCalendar



    like below

     

    Protected Overloads Overrides Sub InitializeCulture()

     

     

    If (System.Threading.Thread.CurrentThread.CurrentCulture.ToString.ToLower = "th-th") Then

     

    System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.Calendar =

    New System.Globalization.GregorianCalendar()

     

     

    End If

     

     

    End Sub

     

  6. DEV24x7
    DEV24x7 avatar
    1 posts
    Member since:
    Nov 2012

    Posted 24 Feb 2014 Link to this post

    I use below code, it's work.

    #fixed Culture.
    //page.aspx
    <telerik:RadDatePicker ID="datePicker" runat="server" Culture="th-TH" Width="100px"
     <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
    </telerik:RadDatePicker>

    #dynamic Culture.
    //page.aspx
    <telerik:RadDatePicker ID="datePicker" runat="server" Width="100px" OnLoad="datePicker_Load">
     <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
    </telerik:RadDatePicker>

    //page.aspx.cs
    protected void datePicker_Load(object sender, EventArgs e)
    {
        if (ApplicationInfo.CurrentUILanguage == "Thai")
            datePicker.Culture = new CultureInfo("th-TH");
        else
            datePicker.Culture = new CultureInfo("en-US");
    }
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017