有没有办法让 bootstrap-ui 组件显示为内联,如下所示:
我尝试了各种各样的东西,但我无法让它们全部对齐。这是Plunkr
<div class="col-md-6">
<p class="input-group">
<input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="popup1.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" alt-input-formats="altInputFormats" />
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open1()"><i class="glyphicon glyphicon-calendar"></i></button>
</span>
<div uib-timepicker ng-model="mytime" ng-change="changed()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></div>
</p>
</div>
更新:
已尝试将 uib-timepicker 标记从更改div
为span
,但这会破坏 datepicker 组件:https ://plnkr.co/edit/CjBzCthVyoQAVooi5oR7?p=preview
UPDATE2: 为了校准,这个问题是关于这个库的:https ://angular-ui.github.io/bootstrap/
UPDATE3: 用相对单位更新了接受答案中提供的plunkr: https ://plnkr.co/edit/TaoVJZwCjh1uLyz3huk9?p=preview