1778

Question:
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?
Answer1:Check manual installation guide <a href="https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Installation#manual" rel="nofollow">here</a>.
You must include:
<ul><li>jQuery</li> <li>Moment.js</li> <li>Bootstrap + collapse + transitions</li> </ul>So the files needed would be:
<ul><li>bootstrap.min.js</li> <li>bootstrap.min.css</li> <li>moment-with-locales.js</li> <li>bootstrap-datetimepicker.css</li> <li>bootstrap-datetimepicker.js </li> </ul>Check this <a href="http://jsfiddle.net/33Le4k93/" rel="nofollow">fiddle</a> 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();