[英]To use datetimepicker in angular4
I am trying to implement the datetimepicker in a project implemented on angular4 and node.js. 我正在尝试在angular4和node.js上实现的项目中实现datetimepicker。
<div class="container">
<div class="row">
<div class='col-sm-2'>
<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 () {
console.log("inside date time picker function ")
$('#datetimepicker1').datetimepicker();
});
</script>
</div>
</div>
I have included a console.log inside jquery. 我在jquery中包含了console.log。 But it doesn't work 但这不起作用
I guess you did not install datetimepicker . 我猜您没有安装datetimepicker 。
Here the link to install it manually. 这里是手动安装链接 。
As you are using Angular4, I suggest you to use the Calendar feature of PrimeNG . 在使用Angular4时,建议您使用PrimeNG 的日历功能 。
See this link to see how to setup PrimeNG on Angular4 查看此链接以了解如何在Angular4上设置PrimeNG
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.