This is a migrated thread and some comments may be shown as answers.

Custom Validator for RadDateTimePicker

1 Answer 72 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Sachin
Top achievements
Rank 1
Sachin asked on 16 Dec 2011, 01:04 AM
 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.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Dec 2011, 03:45 AM
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.
Tags
Calendar
Asked by
Sachin
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or