我在Bootstrap v4.2.1和jquery-3.3.1中使用
现在我想根据以下链接从MD.BootstrapPersianDateTimePicker使用:
https://github.com/Mds92/MD.BootstrapPersianDateTimePicker
<head>
<link href="/Content/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="/Content/MdBootstrapPersianDateTimePicker/jquery.md.bootstrap.datetimepicker.style.css" rel="stylesheet" />
<script src="/Scripts/jquery-3.3.1.min.js" type="text/javascript"></script>
</head>
<body>
<div class="row">
<div class="col-md-1">
@Html.LabelFor(model => model.Event_StartDateTime, new { @class = "control-label" })
</div>
<div class="col-md-3">
@Html.TextBoxFor(model => model.Event_StartDateTime, new { @class = "form-control text-center datetimepicker", lang = "en" })
</div>
<div class="col-md-2">
@Html.ValidationMessageFor(model => model.Event_StartDateTime)
</div>
</div>
</body>
</html>
<script src="/Scripts/umd/popper.min.js" type="text/javascript"></script>
<script src="/Scripts/bootstrap.min.js" type="text/javascript"></script>
<script src="/Scripts/MdBootstrapPersianDateTimePicker/jquery.md.bootstrap.datetimepicker.js"></script>
<script>
$('#Event_StartDateTime').MdPersianDateTimePicker({
targetTextSelector: '#Event_StartDateTime',
selectedDate: new Date('2018/9/30'),
isGregorian: false
});
</script>
页面加载时,我得到了他的错误:
$(...)。MdPersianDateTimePicker不是函数
在
$('#Event_StartDateTime').MdPersianDateTimePicker({
targetTextSelector: '#Event_StartDateTime',
selectedDate: new Date('2018/9/30'),
isGregorian: false
});
为什么?