If the bound date is out of range of min/max it will adjust the date. This is confusing

8 posts, 0 answers
  1. Ole Oscar
    Ole Oscar avatar
    10 posts
    Member since:
    Jan 2015

    Posted 24 Jul 2015 Link to this post

    We are using your components for data validation of external data where data might be wrong.

    We ​use DatePickers a lot ​and we need to set the MinDate and Max​Date when ​users correct values.

    Sometimes the dates is out of range. At the moment I have set the SkipMinMaxDateValidationOnServer="true", but the date is changed when displaying it to min date if the date is below min date. This confuses the users since they don't know the original value of the date and when they see it on the sc​reen they think it is correct and can't understand why the system is complaining about the date since it seems to be within the allowed range.

    Is it possible to keep the original value, but display the nice "waring" symbol instead ?

    As a "not so nice" workaround at the moment we need to adjust the min date to the invalid date so that the date is not changed.

    Regards

    Ole Oscar Johnsen

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 29 Jul 2015 Link to this post

    Hello Ole,

    Based on the provided description I can not fully understand the exact scenario you are implementing. Generally a simple RadDatePicker with set Min and Max dates does not automatically convert the date to min or the max value when it is out of this range but mostly turns to error mode. Testing the simple markup below presents this behavior:
    <telerik:RadDatePicker runat="server" ID="rdp1" MinDate="7/25/2015" MaxDate="7/30/2015" SkipMinMaxDateValidationOnServer="true">
    </telerik:RadDatePicker>

    Please do let me know what the exact scenario you are implementing is, so that we can provide proper solution for your specific case.


    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ole Oscar
    Ole Oscar avatar
    10 posts
    Member since:
    Jan 2015

    Posted 18 Aug 2015 in reply to Maria Ilieva Link to this post

    Hi,
    The main senario is data validation of transactions where other system gives us wrong data since they don't validate the data correctly/don't have validation at all. ​The data is given mainly through web services or files. We do a ​extensive validation of these data based on incoming data and/or data already in our systems. If we find some problems with the data we displays it in exception lists and some have to correct/make a decision based on the data. It is big amount of data and often it is approx < 5% of exceptions. In these situations we don't want to reject all data, only correct the ​​exceptions. Often the invalid data is wrong dates. ​A very simple case is for example ​​that we know that a person was employed on a specific date, but now the other system tells us that payment date is before the employment rate. Often this is because of someone in the ​other system has change​d something so it is invalid.

    And then back to the datepicker. If we use MinDate and MaxDate and we set the MinDate to "Employment Date" for payment date and since the payment date is earlier than EmploymentDate it will not be displayed in the DatePicker. The date will be empty with the result that the user can't see the the original value that is not correct according to min date.
    Regards
    Ole Oscar Johnsen

  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 21 Aug 2015 Link to this post

    Hello,

    In this case when the payment date is earlier than EmploymentDate, the RdadatePicker will turns to error mode. In this case you can handle the OnError event and modify the wrong date as needed.

    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. Ole Oscar
    Ole Oscar avatar
    10 posts
    Member since:
    Jan 2015

    Posted 26 Aug 2015 in reply to Maria Ilieva Link to this post

    In SP1 there is a new ​feature Disabling Autocorrect in RadDateInput. Will this one help in this scenario.

    Regards

    Ole Oscar Johnsen

  7. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 31 Aug 2015 Link to this post

    Hi Ole,

    There is no Autocorrect property available out of the box for the DateInput control. However, you can implement the behavior manually.

    As Maria suggested you can handle the OnError client-side event and adjust the date according to your requirements.

    Regards,
    Viktor Tachev
    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. Ole Oscar
    Ole Oscar avatar
    10 posts
    Member since:
    Jan 2015

    Posted 31 Aug 2015 Link to this post

    Hi, 

    In your document

    http://www.telerik.com/support/whats-new/aspnet-ajax/release-history/ui-for-asp-net-ajax-q2-2015-sp1-version-2015-2-729

    There is something mention about this.

    Input
    NEW
    Disabling Autocorrect in RadDateInput

    The Date picker uses the RadDateInput so i think it will be possible to use it in the DatePicker to. Do you have any information on what this "Disabling of Autocorrect" will do ?

    If this one does the works it will be much easier to use this one instead of implementing the On​Error logic in code behind on every DatePicker in the application.

     Regards

    Ole Oscar Johnsen

     

  9. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 02 Sep 2015 Link to this post

    Hi Ole,

    The feature you are referring to is related to the way the date is parsed by the control. As the user can enter a date manually it should correspond to the defined date format. The new feature introduces the EnableSmartParsing property. It is true by default. Setting the property to false allows the above behavior to be disabled.

    With that said, the above feature does not adjust the date in any way. Thus, implementing such behavior would require custom code.

    Regards,
    Viktor Tachev
    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017