<script type="text/javascript">
function ShowModalPopup(target)
{
$find(target).show();
return false;
}
function CheckDatesMinLessMax(source, arg)
{
var fromdate = document.getElementById('<%=frmTxtEducationSchoolDegreeDateFrom.ClientID %>');
var todate = document.getElementById('<%=frmTxtEducationSchoolDegreeDateTo.ClientID %>');
if(fromdate.value <= todate.value)
arg.IsValid = true;
else
arg.IsValid = false;
}
</script>
<asp:CustomValidator ID="cvEducationDates" runat="server" ClientValidationFunction="CheckDatesMinLessMax" ValidationGroup="addEducation" Display="Dynamic"><div class="validationError"><span></span>Date From needs to be before Date To.</div></asp:CustomValidator>