I working with datetimepicker jquery ui, when code below html , datetimepicker is not displaying and when i inspect with firebug console
it displayed an error `
Keep in mind, the jQuery UI's datepicker is not initialized with datetimepicker(), there appears to be a plugin/addon here: http://trentrichardson.com/examples/timepicker/.
However, with just jquery-ui it's actually initialized as $("#example").datepicker()
. See jQuery's demo site here: http://jqueryui.com/demos/datepicker/
$(document).ready(function(){
$("#example1").datepicker();
});
To use the datetimepicker at the link referenced above, you will want to be certain that your scripts path is correct for the plugin.
$(document).ready(function(){
$("#example1").datetimepicker({
allowMultidate: true,
multidateSeparator: ','
});
});
It's all about the order of the scripts. Try to reorder them, place jquery.datetimepicker.js to be last of all scripts!
For some reason this link solved my problem...I don't know why tho..
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script>
Then this:
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>
NOTE: I am using Bootstrap 3 and Jquery 1.11.3
Place your scripts in this order:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/css/bootstrap-datetimepicker.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>
I had the same problem with bootstrap datetimepicker extension. Including moment.js before datetimepicker.js was the solution.