radcalendat shows a date on entering 12000

4 posts, 0 answers
  1. Nimish Gupta
    Nimish Gupta avatar
    2 posts
    Member since:
    Feb 2010

    Posted 01 Apr 2010 Link to this post

    Hi,

    I have a radcalendar, which is user typeable.

    Upon typing a number like 120000 it takes the date as 12-Dec-1998.

    When i type just 12 , it takes the date as 12 + current Month + current Year

    When i type the 1200 it does not change anything

    What is reason that it takes this date. How can I stop the auto intelligence of the calendar control.

    Sample rad calendar decalration used :

    <

     

    radCln:RadDatePicker ID="rdTransactionStartDate" runat="server">

     

     

    <DateInput Skin="None" DateFormat="dd-MMM-yyyy">

     

     

    </DateInput>

     

     

    <Calendar Skin="Office2007" ShowOtherMonthsDays="False" FastNavigationPrevToolTip="Previous Year"

     

     

    FastNavigationNextToolTip="Next Year" NavigationNextToolTip="Next Month" NavigationPrevToolTip="Previous Month"

     

     

    FastNavigationStep="12" ShowRowHeaders="false">

     

     

    </Calendar>

     

     

    <DatePopupButton CssClass="mLeft10" />

     

     

    </radCln:RadDatePicker>

     

  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 01 Apr 2010 Link to this post

    Hello Nimish,

    You can disable the built-in parsing (when using RadControls for ASP.NET AJAX only) this way:
    <script type="text/javascript">   
        Telerik.Web.UI.RadDateInput.prototype.parseDate = function(value, baseDate)   
        {   
            if (new Date(value) != "NaN")   
                return value;   
        }   
    </script>

    Regards,
    Daniel
    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.
  3. Nimish Gupta
    Nimish Gupta avatar
    2 posts
    Member since:
    Feb 2010

    Posted 06 Apr 2010 Link to this post

    Hey Daniel,

    Thanks for the answer, but I cannot figure out how to use it with my date picker control on the asp.net page.
    Can you send the exact piece of code.

    Thanks,
    Nimish
  4. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 09 Apr 2010 Link to this post

    Hello Nimish Gupta,

    This is the whole markup:
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
     
        <script type="text/javascript">
            Telerik.Web.UI.RadDateInput.prototype.parseDate = function(value, baseDate)
            {
                if (new Date(value) != "NaN")
                    return value;
            }  
        </script>
        <telerik:RadDatePicker ID="RadDatePicker1" runat="server" />
        </form>
    </body>

    Regards,
    Daniel
    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.
Back to Top