Jquery 引导日期选择器自动关闭不起作用
我用的是Bootstrap日期选择器。选择日期后,datepicker不会自动关闭。我正在使用这个图书馆Jquery 引导日期选择器自动关闭不起作用,jquery,twitter-bootstrap,datepicker,Jquery,Twitter Bootstrap,Datepicker,我用的是Bootstrap日期选择器。选择日期后,datepicker不会自动关闭。我正在使用这个图书馆 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootst
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="asset/datepicker/css/bootstrap-datepicker.css">
<link rel="stylesheet" href="asset/datepicker/css/bootstrap-datepicker.standalone.css">
<script src="https://ajax.googleapis.com/ajax/libs/jQuery/1.10.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
这是工作,检查它
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$("#datepicker").datepicker({autoclose: true});
});
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker"></p>
$(函数(){
$(“#datepicker”).datepicker({autoclose:true});
});
日期:
检查此项:我看到了我尝试过的问题,但没有解决。我按照您的说明进行了尝试。我使用了$.fn.datepicker.defaults.autoclose=true;这种方法是可行的,但不是完美的。谢谢你的帮助。
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$("#datepicker").datepicker({autoclose: true});
});
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker"></p>