Skip to content

Commit 7ad6d87

Browse files
author
Eonasdan
committed
Merge pull request Eonasdan#136 from TrevorS/master
Adding installation documentation for the Rails gem.
2 parents 15e53c8 + e0dab44 commit 7ad6d87

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

README.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,29 @@ I'd love to know if your public site is using this plugin and list your logo on
1212
## [bower](http://bower.io):
1313

1414
Run the following command:
15-
````
15+
```
1616
bower install eonasdan-bootstrap-datetimepicker#latest --save
17-
````
17+
```
1818
## [Nuget](https://www.nuget.org/packages/Bootstrap.v3.Datetimepicker/):
19-
````
19+
```
2020
PM> Install-Package Bootstrap.v3.Datetimepicker
21-
````
21+
```
22+
23+
## [Rails](http://rubyonrails.org/)
24+
25+
Add the following to your `Gemfile`:
26+
```
27+
gem 'momentjs-rails', '~> 2.5.0'
28+
gem 'bootstrap3-datetimepicker-rails', '~> 2.1.20'
29+
```
30+
Read the rest of the install instructions @
31+
[TrevorS/bootstrap3-datetimepicker-rails](https://github.com/TrevorS/bootstrap3-datetimepicker-rails)
32+
2233

2334
## See the [Change Log](#change-log) for important changes and updates
2435

2536
Include necessary scripts and styles:
26-
````html
37+
```html
2738
<head>
2839
<!-- ... -->
2940
<script type="text/javascript" src="/bower_components/jquery/jquery.min.js"></script>
@@ -33,7 +44,7 @@ Include necessary scripts and styles:
3344
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/boostrap.min.css" />
3445
<link rel="stylesheet" href="/bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" />
3546
</head>
36-
````
47+
```
3748

3849
Done! [Now take a look at the manual](http://eonasdan.github.io/bootstrap-datetimepicker/) for examples and available options.
3950

@@ -44,46 +55,46 @@ Done! [Now take a look at the manual](http://eonasdan.github.io/bootstrap-dateti
4455
### [Moment.js](https://github.com/moment/moment)
4556
Datetimepicker requires moment.js. This allows for better support for various date formats and locales. See [documentation](http://eonasdan.github.io/bootstrap-datetimepicker/) for examples. Check [Momentjs' homepage](http://momentjs.com/) for documentation on date formats. If you can't use moment.js there's still older version of datetimewidget [available here](https://github.com/Eonasdan/bootstrap-datetimepicker/tree/version1).
4657

47-
````html
58+
```html
4859
<script type="text/javascript" src="/path/to/moment.js"></script>
49-
````
60+
```
5061

5162
### Bootstrap 3 collapse and transition plugins
5263
Make sure to include *.JS files for plugins [collapse](http://getbootstrap.com/javascript/#collapse) and [transitions](http://getbootstrap.com/javascript/#transitions). They are included with [bootstrap in js/ directory](https://github.com/twbs/bootstrap/tree/master/js)
5364

54-
````html
65+
```html
5566
<script type="text/javascript" src="/path/to/bootstrap/js/transition.js"></script>
5667
<script type="text/javascript" src="/path/to/bootstrap/js/collapse.js"></script>
57-
````
68+
```
5869

5970
Alternatively you could include the whole bundle of bootstrap plugins from [bootstrap.js](https://github.com/twbs/bootstrap/tree/master/dist/js)
6071

61-
````html
72+
```html
6273
<script type="text/javascript" src="/path/to/bootstrap/dist/bootstrap.min.js"></script>
63-
````
74+
```
6475

6576

6677
### CSS styles
6778

6879
#### Using LESS
69-
````css
80+
```css
7081
@import "/path/to/bootstrap/less/variables";
7182
@import "/path/to/bootstrap-datetimepicker/src/less/bootstrap-datetimepicker";
7283

7384
// [...] your custom styles and variables
74-
````
85+
```
7586

7687
#### Using CSS (default color palette)
77-
````html
88+
```html
7889
<link rel="stylesheet" href="/path/to/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" />
79-
````
90+
```
8091

8192
### Main JS file
8293

8394
Finally include the main javascript file.
84-
````html
95+
```html
8596
<script type="text/javascript" src="/path/to/bootstrap-datetimepicker.min.js"></script>
86-
````
97+
```
8798

8899
# Change Log
89100

0 commit comments

Comments
 (0)