0

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

1

2 Answers 2

0

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

Sign up to request clarification or add additional context in comments.

4 Comments

I have told us Jquery ui dateRangePicker only not all jquery ui.
@HarleenKaurArora you can download jQuery UI from here jqueryui.com/download (the parts you need) and you can load the js file that you only need in your view.
there is no module for this plugin.
de-select all and check only this jqueryui.com/download/#widgets/datepicker
0

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.

  1. Install all dependencies manually and list down all in the .angular-cli.json file 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>
    
  2. On the top of component insert this lineHeight

    declare var $: any;
    
  3. In your component's constructor call this method

    $(function() { $("#e1").daterangepicker(); });
    

PS: Replace id with your ID name.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.