如何使用bootstrap-datetime選擇器來使用今天和明天的按鈕?
我用bootstrap-datetimepicker做了這個。但我今天需要&明天按鈕&佈局應該如下。我怎樣才能做到這一點?
HTML代碼:
<div class='col-md-6'>
<label class=" text-info">Depart</label>
<div class="form-group">
<div class='input-group date' id='datetimepicker1' data-date-format="DD-MM-YYYY">
<input type='text' class="form-control" placeholder="DD-MM-YYYY" />
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
</div>
<div class='col-md-6'>
<label class=" text-info">Return</label>
<div class="form-group">
<div class='input-group date' id='datetimepicker2' data-date-format="DD-MM-YYYY">
<input type='text' class="form-control" placeholder="DD-MM-YYYY" />
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
</div>
的Javascript
$(function() {
//Depart & Return Date Time Picker
$('#datetimepicker1').datetimepicker({
pickTime: false,
todayBtn: true
});
$('#datetimepicker2').datetimepicker({
pickTime: false
});
});
能否請你告訴我細節? –