Caf*_*ots 2 javascript jquery jquery-ui datepicker
一个简单的问题,我有这个代码使用jquery2.0.3的版本实现jquery ui datepicker,我无法使它工作.我不知道是否有问题,或者我错过了什么.我正在关注这些文档.因为我代码jqueryUI datepicker教程
这是我的代码
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Select a Date Range</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-2.0.3.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script>
$(function() {
$( "#from" ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 3,
onClose: function( selectedDate ) {
$( "#to" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#to" ).datepicker({
defaultDate: "+1w",
changeMonth: true,
numberOfMonths: 3,
onClose: function( selectedDate ) {
$( "#from" ).datepicker( "option", "maxDate", selectedDate );
}
});
});
</script>
</head>
<body>
<label for="from">From</label>
<input type="text" id="from" name="from">
<label for="to">to</label>
<input type="text" id="to" name="to">
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
任何人都可以帮助我.提前致谢.
| 归档时间: |
|
| 查看次数: |
2198 次 |
| 最近记录: |