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

    Hello,

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

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top