bootstrap-datetimepicker不起作用

时间:2014-03-07 16:30:09

标签: html twitter-bootstrap web

我正在使用twitter bootstrap v3.1 日历选项不显示。

    <div class="col-md-6">
    <div class='well'>
        <div class="form-group">
            <div class="input-group date" id="datetimepicker">
                <input type="text" class="form-control" />
                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript" src="js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript">
    $('#datetimepicker').datetimepicker({
        format: 'dd/MM/yyyy hh:mm:ss'
    });
</script>


1 个答案:

答案 0 :(得分:0)

您需要在datetimepicker.js之上加上moment.js并在bootstrap.js之下

<script type="text/javascript" src="http://eonasdan.github.io/bootstrap-datetimepicker/scripts/moment-2.4.0.js"></script>

请参阅此fiddle