Dilkush Dilkush - 5 months ago 17
jQuery Question

Bootstrap DatePicker Is Not Working All The Required Files Have Been Added

I have Used The Following Code To Initialize The DatePicker

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/datepicker.css" />
<title></title>
</head>
<body>
<div class="input-group date" data-provide="datepicker">
<input type="text" class="form-control">
<div class="input-group-addon">
<span class="glyphicon glyphicon-th"></span>
</div>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-datepicker.js"></script>
<script type="text/javascript">
$(document).ready(function (){

$('.datepicker').datepicker();


});

</script>
</body>
</html>


Still The DatePicker Is Not Working ... Can Someone Guide Me Where Have I Been Wrong ... Thanks.

Answer

you forgot to add class name in your datepicker input field

 <input type="text" class="form-control datepicker">