How to install date time range picker using bower

1k Views Asked by At

I want to include date time range picker from this link. I have already installed git gui and node.js.

From the site it says:

  • download the files
  • Bower
  • add "datetimeRangePicker": "latest" to your bower.json file then run bower
  • install OR run bower install datetimeRangePicker
  • include the files in your app
  • range-picker.min.js
  • range-picker.less OR range-picker.min.css OR range-picker.css
  • include the module in angular (i.e. in app.js) - rgkevin.datetimeRangePicker

See the gh-pages branch, files bower.json and index.html for a full example.

I am new to this and I have never used bower before. How do I install datetimeRangerPicker so I can use it in angular js. I am using Netbeans IDE 8.0.2

3

There are 3 best solutions below

14
On

After you have added the dependency in your bower.json file, you need to run the following command :

'bower install --save'

After the command is executed, it will download all the dependencies your 'bower_components' folder. You just have to include the 'range-picker.min.js' file in your 'index.html'. Include the module 'rgkevin.datetimeRangePicker' in your app.js

I think this should work.

7
On

OK! at root of your project create 2 files File 1: '.bowerrc' => extension name with this content

{ "directory": "/lib" }

File 2 : 'bower.json' with this content

{
"name": "Application Name",
"version": "1.0.0",

"dependencies": {
"angular": "latest",
"angular-ui-bootstrap-bower": "latest",
"datetimeRangePicker": "latest"
} }

After that in you git bash or command invite go to C:/XXX/YourApplication/ bower install

Then you done.

0
On

First, you need to install Bower. I'm assuming you have npm installed because you have node.js already.

The command to install Bower is

npm install -g bower.

That will enable the bower install <package_name> command globally (ergo the -g flag) on your machine.

Next, you'll want to create a bower.json file. Bower helps you do this. Type bower init from the directory you want the file in and follow the directions to configure the settings for your project. This will automatically create the bower.json file for you.

To install your package, use:

bower install --save datetimeRangePicker

The --save flag tells Bower to add the dependency line automatically to the bower.json file you just created. To tell what the command to install the package is, just look at the package's bower.json file on GitHub. You'll see that your particular package is named datetimeRangePicker. Note that if you try to install datetimerangepicker without the proper caps, it won't work.