0x800a01b6-JavaScript运行时错误:对象不支持属性或方法“ datetimepicker”

时间:2019-11-01 14:19:55

标签: javascript bootstrap-datetimepicker

我正在尝试从here实现datetimepicker,但收到错误0x800a01b6-JavaScript运行时错误:对象不支持属性或方法'datetimepicker'

我已经尝试过this帖子中给出的解决方案 当我尝试使用datepicker()时,它可以很好地工作,但是我也需要显示时间。

下面是代码:

<script src="~/assets/Validations/jquery.unobtrusive-ajax.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/css/bootstrap-datetimepicker.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>



<div class="form-group">
     <label class="col-md-4">Performed At From:</label>
     <div class="col-md-8 input-group date" tabindex="5">                                            
         @Html.TextBoxFor(x => x.filter.selectedFromDate, new { @class = "form-control", id = "datetimepicker1", @type = "text" })
     <span class="input-group-addon">
     <span class="glyphicon glyphicon-calendar"></span>
     </span>
    </div>

<script type="text/javascript">
                $(function () {
                    $('#datetimepicker1').datetimepicker();
                });
</script>

任何帮助将不胜感激。谢谢。

0 个答案:

没有答案