我使用http://eonasdan.github.io/bootstrap-datetimepicker/作为日历功能
这是html
cannot convert from 'std::basic_istream<char, std::char_traits<char> > to 'bool'
构建
<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>
如何显示从当前日期起20天的默认日期?
答案 0 :(得分:4)
使用defaultDate和moment.js(我相信这个插件是必需的)
$('#datetimepicker1').datetimepicker({
format: 'l',
locale:'en-gb',
defaultDate: moment().add(20, 'days')
});