【发布时间】:2015-05-24 17:33:38
【问题描述】:
我有以下 HTML,我想将日期选择器放置在数量选择和提交按钮之间。它仅显示在页面中在按钮之后。
<div class="container">
<form class="form-inline" role="form">
<!-- *** This should show-up first *** -->
<div class="form-group col-sm-2">
<label label-default="label-default" for="Qty">Qty</label>
<span class="addon glyphicon glyphicon-user"></span>
<select class="form-control input-sm" id="Qty">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
</div>
<!-- ** The Datepicker should sow up after, in the middle ***-->
<div class="input-daterange input-group col-sm-2" id="DatePickerId">
<input type="text" class="input-sm form-control" data-provide="datepicker" buttonClasses="glyphicon glyphicon-calendar" name="start" placeholder="Start" id="startdate"/>
<span class="input-group-addon">
<label for="startdate" class="glyphicon glyphicon-calendar"></label>
</span>
<input type="text" class="input-sm form-control" data-provide="datepicker" buttonClasses="glyphicon glyphicon-calendar" name="end" placeholder="End" id="enddate"/>
<span class="input-group-addon">
<label for="enddate" class="glyphicon glyphicon-calendar"></label>
</span>
</div>
<!-- *** The button should show up in third *** -->
<div class="form-group col-sm-3">
<button class="form-control input-sm btn btn-default" id="SubmitId" data-modal-template="Submit">Submit</button>
</div>
</form>
但它是这样显示的:
如何让它以正确的顺序显示?
【问题讨论】:
-
代码看起来一切正常,这可能是您的 css 中的问题。您可以将链接发布到您的页面或我们可以看到 css 代码的地方吗?
标签: twitter-bootstrap datepicker bootstrap-datepicker