bootstrap daterangepicker open by button
i use the bootstrap daterangepicker (dangrossman) and Bootstrap 3. Now i want does i can the daterangepicker open with a addon-button and with clickling in the input field
my code:
<div class="form-group">
<div class="input-group input-group-sm">
<span class="input-group-btn">
<button class="btn btn-default" type="button"><span class="glyphicon glyphicon-calendar"></span></button>
</span>
<input id="daterangepicker" class="form-control" type="text" name="daterangepickerDisplay">
</div>
</div>
This works.. but only when i click in the inputfield..
This worked for me!!
$('#my-input').data('daterangepicker').toggle();
试试这个代码
$('#some-button').click(function () {
$('#my-input').datepicker('show');
})
链接地址: http://www.djcxy.com/p/84004.html