Plain datepicker, no validator. Open, select date, OK

Datepicker with validator. Open, select date, will not close. Look at console to see error.
SCRIPT5007: Unable to get value of the property 'length': object is null or undefined
WebResource.axd?d=vx4hSsFbFNt4s6QQ88Ef9ALhWrt9zlOcopbxIck4_p41&t=633784387097263991, line 172 character 17
 
Datepicker with validator and blank onSelect. OK.
 

Page Code:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test_datepicker.aspx.vb" Inherits="test_datepicker" %>
<!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>

	<script src="include/jquery/1.7.2/jquery-1.7.2.js" type="text/javascript"></script>
	<script src="include/jquery/jqueryui/1.8.22/development-bundle/ui/jquery-ui-1.8.22.custom.js" type="text/javascript"></script>
	<link href="include/jquery/jqueryui/1.8.22/css/custom/jquery-ui-1.8.22.custom.css" rel="stylesheet" type="text/css" />
	
	<script type="text/javascript">
		$(document).ready(function()
		{
			$(".plain").datepicker();
			$(".validator").datepicker();
			$(".validatorblank").datepicker({
				onSelect: function(){}
			});
			$(".somefunction").datepicker();
			
			$(".somefunction").change(function(e)
			{
				console.log("somefunction has changed and e.srcElement is " + e.srcElement);
			});
			
			
		});
		
		$(window).load(function()
		{
		});
	</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
		Plain datepicker, no validator. Open, select date, OK<br />
		<asp:TextBox runat="server" ID="plain" CssClass="plain"></asp:TextBox>
		<hr />
		Datepicker with validator. Open, select date, will not close. Look at console to see error.<br />
		<div style="font-size:0.8em;margin:10px;" class="ui-state-error" >
		SCRIPT5007: Unable to get value of the property 'length': object is null or undefined <br />
		WebResource.axd?d=vx4hSsFbFNt4s6QQ88Ef9ALhWrt9zlOcopbxIck4_p41&t=633784387097263991, line 172 character 17
		</div>
		<asp:TextBox runat="server" ID="TextBox1" CssClass="validator"></asp:TextBox>
		<asp:RequiredFieldValidator runat='server' ID="rfv" ControlToValidate="TextBox1" EnableClientScript="true" ErrorMessage="Required" />
		<hr />
		Datepicker with validator and blank onSelect. OK.<br />
		<asp:TextBox runat="server" ID="TextBox2" CssClass="validatorblank"></asp:TextBox>
		<asp:RequiredFieldValidator runat='server' ID="RequiredFieldValidator1" ControlToValidate="TextBox2" EnableClientScript="true" ErrorMessage="Required" />
		<hr />
		<input type="text" id="somefunction" class="somefunction" name="somefunction" />
		
		<hr />
		<h2>Page Code:</h2>
		<pre>
<asp:Label runat='server' ID="lblRawOutput" />	
		</pre>
    </div>
    </form>
</body>
</html>