Stop auto-correcting date

8 posts, 0 answers
  1. Jack
    Jack avatar
    4 posts
    Member since:
    Sep 2011

    Posted 21 Oct 2015 Link to this post

    When a user enters a date of 1a/2/2​015, the raddatepicker auto​-corrects it to 1/2/2015. If a user enters a date of 13/01/2015 the raddatepicker auto-corrects it to 01/13/2015. I don't want the control to assume what the user meant to type. I would like to turn this feature off so that I can throw a validation error. Is this possible?
  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 26 Oct 2015 Link to this post

    Hi Jack,

    You can try setting the following property to achieve this requirement:
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
        <DateInput runat="server" EnableSmartParsing="false">
        </DateInput>
    </telerik:RadDatePicker>

    Hope this helps.

    Regards,
    Eyup
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jack
    Jack avatar
    4 posts
    Member since:
    Sep 2011

    Posted 04 Jan in reply to Eyup Link to this post

    Hi Eyup,

    Sorry it's been so long, I was on another project.

    This did not solve my issue. Below is the source for one of the datepicker controls:

    <telerik:RadDatePicker ID="rdpBegin" Runat="server" Culture="en-US" ResolvedRenderMode="Classic">
        <Calendar EnableWeekends="True" FastNavigationNextText="&lt;&lt;"
            UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False">
            <ClientEvents OnDateSelected="dateSelected" />
        </Calendar>
        <DateInput ID="DateInput1" runat="server" EnableSmartParsing="false">
            <ClientEvents OnError="HandleError" />
            <EmptyMessageStyle Resize="None" />
            <ReadOnlyStyle Resize="None" />
            <FocusedStyle Resize="None" />
            <DisabledStyle Resize="None" />
            <InvalidStyle Resize="None" />
            <HoveredStyle Resize="None" />
            <EnabledStyle Resize="None" />
        </DateInput>
        <DatePopupButton HoverImageUrl="" ImageUrl="" />
    </telerik:RadDatePicker>

  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 07 Jan Link to this post

    Hello Jack,

    I have tested the provided code in a sample application on my end and it works correctly without modifying the entered date as per your requirements. Please make sure that you are using the latest version of the controls where the mentioned property is implemented.

    Regards,
    Maria Ilieva
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  6. Martin Horst
    Martin Horst avatar
    39 posts
    Member since:
    Apr 2010

    Posted 02 Mar in reply to Maria Ilieva Link to this post

    Hi.

    i've got the same problem. I tried the EnableSmartParsing="false" option but after setting the smart parsing to false i can't input any date, even valid ones. I added my html code below how i configured the datepicker.

     

    Best regards

    Martin Horst

     

              <telerik:RadDatePicker ID="datePickerGeburtsDatum" runat="server" RenderMode="Classic" MinDate="01.01.0001">
                <DateInput runat="server" DateFormat="dd.MM.yyyy" DisplayDateFormat="dd.MM.yyyy" EnableSmartParsing="false"></DateInput>
                <DatePopupButton ImageUrl="/web/images/icons/datepicker_normal.png" HoverImageUrl="/web/images/icons/datepicker_hover.png"/>            
              </telerik:RadDatePicker>

  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 07 Mar Link to this post

    Hello,

    I tried to replicate the issue you described on my end but to no avail, Re "EnableSmartParsing" property is working properly in my test application. See the test pages attached and verify what the difference in your case is.

    Regards,
    Maria Ilieva
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  8. Martin Horst
    Martin Horst avatar
    39 posts
    Member since:
    Apr 2010

    Posted 09 Mar in reply to Maria Ilieva Link to this post

    Hello,

    today I installed the latest version (Q1 2016) but I still got the same issue. Every date I enter or select is marked as invalid. 

    Regards

    Martin Horst

  9. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 11 Mar Link to this post

    Hello,

    I tested the described scenario and it works properly on my end. Find attached my test project and verify what the difference in your case is.

    Regards,
    Maria Ilieva
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017