DateTimePicker Format Error

3 posts, 0 answers
  1. Erwin
    Erwin avatar
    74 posts
    Member since:
    Apr 2009

    Posted 02 Dec 2009 Link to this post


    i have a Raddatetimepicker that has a format "dd/MM/yyyy HH:mm" in serverside pageload then assign the present date to it. Example December  2 ,2009  7:30 am  the display is   "02/12/2009 07:30". Every 15 seconds it would update its time. I have a java script that triggers ClientEvents-OnLoad = OnDtpLoad




    the javascript would look like this:

    function OnDtpLoad(){




     dtpTime = $find("<%=RadDateTimePicker.ClientID%>");



        var updateDate = new Date();   


        dtpTime.set_selectedDate(updateDate );




    t = setTimeout(OnDtpLoad()', 15000);

    this function would trigger ever 15 seconds to update the datepicker.

    if you look at it,  you would expect that the datepicker display would be "02/12/2009 07:30"  but instead it display this "12/02/2009 07:30". with a value of Febuary 12, 2009 7:30 am..

    Why is this so???  I have tried formating the date in javascript but it will return Febuary.
    if you would do this:
        the display would be first December next update would be Febuary then December then Febuary and so on..
    I think is because of the Format dd/mm/yyyy since in the format mm/dd/yyyy the display is OK.....

    Please help...
        I'm using Q1 2009 and  I'm in a country where the format is mm/dd/yyyy but i need the format dd/mm/yyyy

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 02 Dec 2009 Link to this post

    Hello Erwin,

    I guess the problem happens for old version of Telerik control. I tried the same scenario in my end (RadControls version 2009, 3, 1103, 35) and it is working fine for me. Can you try upgrading to latest control and check if this helps?
    Updating RadControls for ASP.NET to another version or license

  3. Dimo
    Dimo avatar
    8452 posts

    Posted 02 Dec 2009 Link to this post


    That is correct, the issue is resolved in later releases (Q2 2009). The problem is that the order of days and month in the DateFormat is different from the order of the default DateFormat for the given culture. In Q1 2009 such scenario was not supported.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top