Null DateTime validation

3 posts, 0 answers
  1. Steve
    Steve avatar
    19 posts
    Member since:
    Apr 2009

    Posted 10 Nov 2011 Link to this post

    The standard Silverlight date/time editors throw a validation "Input is not in the correct format." when changed to null (blanked out). The RadDateTimePicker uses a nullable SelectedValue and that validation message is never displayed. The property is a stright up DateTime and has a RequiredValueVerifier (DevForce) but nothing is ever shown in the UI that the field needs something done to become valid. The RequiredValueVerifier is never actually used in the standard Silverlight controls because I believe it hits a cast or parse exception first.

    How do I show in the UI that the field is required?

    Thanks,
    Steve
  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 11 Nov 2011 Link to this post

    Hi Steve,

    You can find attached an example demonstrating how to validate RadDateTimePicker.

    All the best,
    Ivo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Steve
    Steve avatar
    19 posts
    Member since:
    Apr 2009

    Posted 11 Nov 2011 Link to this post

    Thanks Ivo,

    The one that made it work was ValidatesOnExceptions=True, which you didn't have in the sample.

    Thanks,
    Steve
Back to Top