Angular 如何使用 daterangepicker 包?
How to use daterangepicker package with Angular?
我正在尝试使用 daterangepicker in an angular project and getting the following errors. Can someone please help me out how to get it working? Thanks!. Here is the stack blitz link for the same. Stackblitz
这里是一个基于“ng-bootstrap”的 dateRangePicker 示例。
您显示的包裹需要 jQuery 和时间。我个人认为使用 jQuery 和 Angular 不是一个好主意,但如果你想包含,请参阅,例如this link
npm install jquery — save
并编辑您的 angular.json 添加脚本
"scripts": [
"node_modules/jquery/dist/jquery.min.js"
]
并使用
import $ from 'jquery';
在你的组件中
注意:使用 ngOnInit,而不是构造函数
注意 2:不要忘记在您的样式中包含 daterangepicker.css
我正在尝试使用 daterangepicker in an angular project and getting the following errors. Can someone please help me out how to get it working? Thanks!. Here is the stack blitz link for the same. Stackblitz
这里是一个基于“ng-bootstrap”的 dateRangePicker 示例。
您显示的包裹需要 jQuery 和时间。我个人认为使用 jQuery 和 Angular 不是一个好主意,但如果你想包含,请参阅,例如this link
npm install jquery — save
并编辑您的 angular.json 添加脚本
"scripts": [
"node_modules/jquery/dist/jquery.min.js"
]
并使用
import $ from 'jquery';
在你的组件中
注意:使用 ngOnInit,而不是构造函数
注意 2:不要忘记在您的样式中包含 daterangepicker.css