RadDatePicker autocorrect

8 posts, 0 answers
  1. Kazimierz Szadkowski
    Kazimierz Szadkowski avatar
    9 posts
    Member since:
    Sep 2009

    Posted 22 Mar 2010 Link to this post

    I have a problem with autocorrect functionality of RadDatePicker control. When I manually type invalid date '29-02-2010' (no such date this year) it is automatically changed to '28-02-2010', without any notice. It might be confusing for users, so I would rather like to display validation message and let users correct themselves. However, I cannot find a way to turn autocorrection off. I would be most grateful for any tips.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Mar 2010 Link to this post


    Add the following client side code in order to override the built-in date parser engine.

    <script type="text/javascript">    
        Telerik.Web.UI.RadDateInput.prototype.parseDate = function(value, baseDate)    
            if (new Date(value) != "NaN")    
                return value;    

    Hope this helps,
  3. Kazimierz Szadkowski
    Kazimierz Szadkowski avatar
    9 posts
    Member since:
    Sep 2009

    Posted 23 Mar 2010 Link to this post

    Works like a charm. Thanks!
  4. Kazimierz Szadkowski
    Kazimierz Szadkowski avatar
    9 posts
    Member since:
    Sep 2009

    Posted 30 Mar 2010 Link to this post

    Unfortunatelly something goes wrong with this solution - when I use the function you suggested some client events of DatePicker and its DateInput are blocked. For example, 'ValueChanging" of DateInput is executed, but "ValueChanged" not. "DateSelected" od DatePicker doesn't work either. How can I deal with this?
  5. Chris Lynch
    Chris Lynch avatar
    5 posts
    Member since:
    Mar 2010

    Posted 30 Mar 2010 Link to this post

    Unfortunately, the date picker control is awful.

    My suggestion is that you abandon Telerik and implement one of these options:


    I suggest the jquery route.

  6. Dimo
    Dimo avatar
    8479 posts

    Posted 31 Mar 2010 Link to this post

    Hello all,

    Another discussion on the same topic goes at the following forum thread, where a more in-depth description of the situation is provided:


    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Joe
    Joe avatar
    16 posts
    Member since:
    Oct 2013

    Posted 06 Oct 2014 Link to this post

    I have almost the complete opposite of the above problem with the radDatePicker date input. When tabbing away from a GridDateTimeColumn where the column has the following properties:

    <telerik:GridDateTimeColumn HeaderText="Sign Date"
    <HeaderStyle Width="120px" />

    The autocorrect function that I'm assuming is embedded in the Telerik DLL isn't consistently firing. On the Radgrid right above it though, it works correctly. Any idea as to how I can ensure that this fires every time I move away from the GridDateTimeColumn?


    - Joe
  8. Viktor Tachev
    Viktor Tachev avatar
    2499 posts

    Posted 09 Oct 2014 Link to this post

    Hello Joe,

    I have replied to your query in the other thread you have posted here. I suggest we continue the conversation there.

    On a side note, please have in mind that it is recommended to avoid submitting duplicate threads. This will allow us to keep better track of your support history an provide better answers quicker.

    Viktor Tachev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top