<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<script type="text/javascript">
function ValidateDate(source, args) {
var txtFrom = document.getElementById('<%= txtdate.ClientID%>').value;
var txtTo = document.getElementById('<%= txtTodate.ClientID%>').value;
var txtDate = new Date(txtFrom);
var txtToDate = new Date(txtTo);
if (txtDate <= txtToDate)
args.IsValid = true;
else
args.IsValid = false;
}
</script>
<div>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="Validate" />
<asp:TextBox ID="txtdate" runat="server"></asp:TextBox>
<asp:TextBox ID="txtTodate" runat="server"></asp:TextBox>
<asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator"
ClientValidationFunction="ValidateDate" ValidationGroup="Validate"></asp:CustomValidator><asp:Button ID="Button1"
runat="server" Text="Button" ValidationGroup="Validate" />
</div>
</form>
</body>
</html>
Your Code is working fine, Tested in Chrome Version 23.0.1271.97 m