Custom Validator for RadDateTimePicker

2 posts, 0 answers
  1. Sachin
    Sachin avatar
    1 posts
    Member since:
    Dec 2011

    Posted 15 Dec 2011 Link to this post

     Is there are a way to do custom validation on the client side for RadDateTimePicker (tie a custom validator). We want to prevent users from entering a date that is greater than the current date/time and want to do it on the clientside.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Dec 2011 Link to this post


    Give a try in ClientValidationFunction of CustomValidator. Here is the sample code.
    <script type="text/javascript">
        // ClientValidationFunction of CustomValidator
      function ClientValidationFunction1(sender, args)
          var datepicker = $find("<%=RadDatePicker1.ClientID%>");
           var dt=datepicker.get_dateInput();
           // your code

Back to Top