Reputation: 307
I use bootstrap datepicker as shown in this html code:
<html>
<head>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap-datepicker.min.css">
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script type="text/javascript">
$(function () {
$('.datepicker').datepicker('show');
$(".datepicker").on("changeDate", function(event) {
});
});
</script>
</head>
<body >
<div class="datepicker" data-date=""></div>
</body>
</html>
I want when i click outside the calendar it will never closes and keep showing on the screen and thank you.
Upvotes: 1
Views: 2537
Reputation: 13854
you can use $('.datepicker').data('datepicker').hide = function () {};
to keep open always
full code js
$(function () {
$('.datepicker').datepicker('show');
$(".datepicker").on("changeDate", function(event) {
});
});
$('.datepicker').data('datepicker').hide = function () {};
html
<body >
<div class="datepicker" data-date=""></div>
</body>
Upvotes: 1