Your bootstrap Html should be like this:
(您的引导HTML应该是这样的:)
<div class = "container">
<div class="row">
<div class="col d-flex">
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input-sm form-control" name="from"
placeholder="startdate" width="110"/>
<span class="input-group-addon">To</span>
<input type="text" class= "input-sm form-control"
placeholder="enddate" width="110"/>
</div>
</div>
</div>
</div>
Then it'll be left aligned.
(然后它将保持对齐状态。)
And for dd-mm-yyyy format your script should be like this.
(对于dd-mm-yyyy格式,您的脚本应如下所示。)
// date functionality
$(document).ready(function(){
$('.input-daterange').datepicker({
dateFormat: "dd-mm-yy",
"orientation":"left"
});
});
I hope it'll help you
(希望对您有帮助)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…