set_selectedDate() displays wrong date format

3 posts, 0 answers
  1. Roland Klug
    Roland Klug avatar
    28 posts
    Member since:
    Dec 2002

    Posted 23 Mar 2012 Link to this post

    Hi Telerik team,

    I'm facing a problem with the raddatepicker, raddatetimepicker and radtimepicker controls in your recent release 2012.1.215.35. With release 2011.3.1305.35 there was no such problem.

    Please take a look at this page: I hope this page helps to clearify the issue.

    I implemented a custom date picker control which inherits from your raddatepicker. The intention is to provide a set of keyboard shortcuts in order to easily change the selecte date. I.e., when the user focuses the date picker control and presses the "v" key, the previous day is set, pressing the "n" key sets the next day, pressing "h" sets the current day and so forth. I use javascript code to determine the appropriate date value and set it using the set_selectedDate() method.

    This works fine. The problem is that after setting the date value, it is displayed in the wrong format, and I don't konw how to change this format (I tried "DateFormat", "DisplayDateFormat", "Culture", but to no avail).

    For instance, without being focused the date is displayed correctly in German format, like "23.03.2012". After focusing the picker control and pressing the "v" key (which sets the previous day), the date is displayed like "2012-03-22-00-00-00". When the picker control looses the focus, the date is displayed correctly again like "22.03.2012".

    The problem becomes more severe for the radtimepicker control, which indicates an error after setting the date value (because on invalid data input).

    Thank your for your assistance!
  2. Vasil
    Vasil avatar
    1642 posts

    Posted 26 Mar 2012 Link to this post

    Hello Roland,

    Thank you for the provided sample. I see the problem. It happens because of the new rendering of RadInput. We will try to improve the new rendering in order to work properly for such cases. Until then you could set EnableSingleInputRendering="false" to the DateInput's of your pickers.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Roland Klug
    Roland Klug avatar
    28 posts
    Member since:
    Dec 2002

    Posted 27 Mar 2012 Link to this post

    Thank you! That resolved the issue for the moment.
Back to Top