DatePicker and Validation

3 posts, 0 answers
  1. Jeremy Elbourn
    Jeremy Elbourn avatar
    2 posts
    Member since:
    Feb 2010

    Posted 15 Apr 2010 Link to this post

    I am attempting to implement a number of RadDatePickers throughout an application. I am stuck, though, on performing validation the way I want it to work. The desired behavior would be to have a Validator attached to the DatePicker that prevents the page from posting back if the text in the DateInput is not a valid date, but does allow a post if the DateInput is empty. None of the standard ASP.NET validators seem to do the job because the DateInput appears empty to them whenever it has an invalid text. This behavior would be necessary on a number of different pages throughout the application, so individually handling each DatePicker with a CustomValidator would not be a desirable solution. Is there some solution that would work using the available validation tools, or would implementing a new validator type be the best way to accomplish this?
  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 20 Apr 2010 Link to this post

    Hello Jeremy,

    Try the solution provided in this code library and see if it works for you.

    I hope this helps.

    Regards,
    Iana
    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. Jeremy Elbourn
    Jeremy Elbourn avatar
    2 posts
    Member since:
    Feb 2010

    Posted 20 Apr 2010 Link to this post

    While this is what I was trying to do, the CustomValidator solution linked isn't ideal for application-wide deployment. At this point I've already written my own validation control to handle the situation.
Back to Top