Invalid initial date?

2 posts, 0 answers
  1. Raymond
    Raymond avatar
    27 posts
    Member since:
    Jul 2014

    Posted 24 Oct 2017 Link to this post

    I have a situation where users need to edit previously entered data, which might not be valid.  For example, assume the valid range for an invoice date is the current month (10/1/2017 to 10/31/2017).  Also assume I have an existing invoice with a date outside that range (11/5/2017).  I'd like to present the invalid value to the user, and have the min/max validation force them to fix it. 

    Ideally, I could just set the min, max, and selected values in the code behind, and let the client side validation do it's job.  However, setting the selected date to the invalid date in the code behind throws an exception.  I also tried setting the selected date first, then applying the min/max...but then it changes the selected date based on the min/max.  And the InvalidTextBoxValue is read only, so that's not an option.


    Is there a way to have the initial date value be an invalid value?  I used the example of a date being outside the min/max range...but in our situation it's possible that the original value wouldn't even be a valid date.  Is there anything built into the control that would help with this situation?  One option would be to not use the built in min/max...and implement my own client side validation to do the range check.  But I view that as a last resort.



  2. Eyup
    Eyup avatar
    3543 posts

    Posted 30 Oct 2017 Link to this post

    Hello Raymond,

    I am afraid RadCalendar does not provide this requirement built-in. You can try to hint the user visually by changing the class of this date cell manually:

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top