Bootstrap Datetimepicker跨度中断

时间:2016-07-27 14:49:32

标签: javascript jquery html css twitter-bootstrap

我使用Bootstrap 3 Datepicker v4但是有些东西坏了,我无法修复它。我认为这是打破CSS的输入。

<div class="container">
    <div class="row">
        <div class='col-sm-6'>
            <div class="form-group">
                <div class='input-group date' id='datetimepicker1'>
                    <input type='text' class="form-control" />
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $(function () {
                $('#datetimepicker1').datetimepicker();
            });
        </script>
    </div>
</div>

RESULT

为了消除跨度和输入之间的边距,我应该覆盖什么?

enter image description here

1 个答案:

答案 0 :(得分:1)

我尝试使用Bootply重新创建该问题,但无法使用。

因此请尝试更改div的宽度,如下所示:

<div class='input-group date' id='datetimepicker1' style="width: 90%" <!-- Or something like that depending on what your preference is -->>
    <input type='text' class="form-control" />
        <span class="input-group-addon">
            <span class="glyphicon glyphicon-calendar"></span>
        </span>
</div>

请告诉我这是否有帮助!