disable AutoFill date option

5 posts, 0 answers
  1. pasam Anna
    pasam Anna avatar
    19 posts
    Member since:
    Oct 2009

    Posted 25 Oct 2011 Link to this post

    Hi
      How to disable autofill date option in calender control.
    If I enter year and lost focus its fill automatically date.
    How to avoid this.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Oct 2011 Link to this post

    Hello Pasam,

    You can try the following javascript.

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

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. pasam Anna
    pasam Anna avatar
    19 posts
    Member since:
    Oct 2009

    Posted 25 Oct 2011 Link to this post

    Hi Princy.
     Thanks for your Suggestion.
    This piece of code works fine in IE Browser.
    But in Chrome its Not working.
  5. Robert
    Robert avatar
    198 posts
    Member since:
    Aug 2009

    Posted 27 Jun 2012 Link to this post

    Princy,

    This doesn't work for me.  It still shows the little triangle in the text box indicating that it is invalid.


    <script type="text/javascript">
    Telerik.Web.UI.RadDateInput.prototype.parseDate = function (value, baseDate)
    {
       if (new Date(value) != "NaN")  {
       return new Date(value);
       this.set_textBoxValue(value); 
        }
    }
    </script>
  6. Robert
    Robert avatar
    198 posts
    Member since:
    Aug 2009

    Posted 28 Jun 2012 Link to this post

    Actually scratch that Princy.... it's working for me now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017