Can't Make Datepicker Bootstrap To Work
I copy and paste the first example from this website http://eonasdan.github.io/bootstrap-datetimepicker/ to my own html codes. When I click on the picture beside the textbox, it do
Solution 1:
It seems like you are missing the Datepicker JavaScript library.
Include this and your datepicker should work.
Solution 2:
You haven't included any js. To make this work you should include bootstrap-datetimepicker.js and bootstrap.min.js
Solution 3:
Do you make use of Firebug? Do you get any errors? You might also have to include the jQuery library in order to make use of the $() function.
Solution 4:
Can you perhaps try the following code.
Very basic example that is working.
<!DOCTYPE html>
<html>
<head>
<title>Datepicker</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Bootstrap CSS and bootstrap datepicker CSS used for styling the demo pages-->
<link rel="stylesheet" href="css/datepicker.css">
<link rel="stylesheet" href="css/bootstrap.css">
</head>
<body>
<div class="container">
<input type="text" placeholder="Click to show datepicker" id="datetimepicker1">
</div>
<!-- Load jQuery and bootstrap datepicker scripts -->
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script type="text/javascript">
// When the document is ready
$(document).ready(function () {
$('#example1').datepicker({
format: "dd/mm/yyyy"
});
});
</script>
</body>
</html>
Post a Comment for "Can't Make Datepicker Bootstrap To Work"