尝试这个
<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
$("#AsOfDate").datepicker({
dateFormat: 'yy-mm-dd',
yearRange: '1900:2012',
monthRange: '01:12',
minDate: new Date('1900/01/01'),
maxDate: '+30Y,
changeMonth: true,
changeYear: true
});
});
</script>
</head>
<body>
<p>Date: <input type="text" id="AsOfDate" /></p>
</body>
</html>
确保 jQuery 和 Jquery Ui 正确加载,尝试从 CDN 加载它。