I am using bootstrap datetimepicker version 3. Here datetimepicker de-faulty taking current date and time. But in next version this problem is resolved. So I will try to use Eonasdan bootstrap datetimepicker version v4. For that what are the js and css files I have include in my jsp page?
Check manual installation guide here.
You must include:
- jQuery
- Moment.js
- Bootstrap + collapse + transitions
So the files needed would be:
- bootstrap.min.js
- bootstrap.min.css
- moment-with-locales.js
- bootstrap-datetimepicker.css
- bootstrap-datetimepicker.js
Check this fiddle for a working example.
HTML:
<br/>
<!-- padding for jsfiddle -->
<div class="row">
<div class="col-md-12">
<h6>datetimepicker1</h6>
<div class="form-group">
<div class="input-group date" id="datetimepicker1">
<input type="text" class="form-control" /> <span class="input-group-addon"><span class="glyphicon-calendar glyphicon"></span></span>
</div>
</div>
</div>
</div>
JS:
$('#datetimepicker1').datetimepicker();
来源:https://stackoverflow.com/questions/29001753/bootstrap-datetimepicker-installation