I use http://eonasdan.github.io/bootstrap-datetimepicker/ for Calendar functionality
Here is the html
<div class="form-group" id="div_mydatecontainer">
<div class='input-group date' id='datetimepicker1'>
<input type='text' class="form-control" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
construct
$('#datetimepicker1').datetimepicker({
format: 'l',
locale:'en-gb'
});
How can I display a default date which is 20 days from current date?
use defaultDate and moment.js (which I believe is required for that plugin anyway)
$('#datetimepicker1').datetimepicker({
format: 'l',
locale:'en-gb',
defaultDate: moment().add(20, 'days')
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With