nethken nethken - 1 year ago 207
jQuery Question

Bootstrap datetimepicker is not working

Hello can my datetimepicker is not workin and i dont know the reason why. Can someone help me about this?

here is the links

<link rel="stylesheet" href ="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-datetimepicker.css" />
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">

here is the code it's inside the
but i think dont need to put it here

<div class='input-group date' id='datetimepicker1'>
<input type='text' class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>

here is my scripts

<script src="js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="js/moment.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript">

$(function () {

here is the output
enter image description here

my css folder
enter image description here

my js folder
enter image description here

Answer Source

First, for the datepicker to show up, you need to call the function on the input.

$('#datetimepicker1 input').datetimepicker()

Also, please include the relevant css files for the glyphicons to show up

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download