I have seen the demo of the jQuery UI DateRangePicker but I did not find out how to use in angular4 because there is no package of jQuery UI DateRangePicker in angular2. Please tell us how to use in angular4. I have use angular version is:- 4.3.3
2 Answers
You can download the jQuery Ui from NPM, check this link https://www.npmjs.com/package/jquery-ui you can download the ui picker js file and can use them from the project directory. check this answer to add the js file into your view https://stackoverflow.com/a/41899261/713789
4 Comments
Yes, as per documentation there is no npm package to use this dateRangePicker in your angular2 app, so if you want to
use this in your project do complete the following steps.
Install all dependencies manually and list down all in the
.angular-cli.jsonfile in your app accordingly.<link href="jquery-ui.min.css" rel="stylesheet"> <link href="jquery.comiseo.daterangepicker.css" rel="stylesheet"> <script src="jquery.min.js"></script> <script src="jquery-ui.min.js"></script> <script src="moment.min.js"></script> <script src="jquery.comiseo.daterangepicker.js"></script>On the top of component insert this lineHeight
declare var $: any;In your component's constructor call this method
$(function() { $("#e1").daterangepicker(); });
PS: Replace id with your ID name.