You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,21 @@ Add this line to your application's `Gemfile`:
16
16
gem 'active_admin_datetimepicker'
17
17
```
18
18
19
+
And to `package.json`:
20
+
```javascript
21
+
"dependencies": {
22
+
"jquery-datetimepicker":"^2.5.4"
23
+
}
24
+
```
25
+
19
26
And then execute:
20
27
21
-
$ bundle
28
+
$ bundle && yarn
22
29
23
30
Or install it yourself as:
24
31
25
32
$ gem install active_admin_datetimepicker
33
+
$ yarn add jquery-datetimepicker
26
34
27
35
Add the following line into `app/assets/stylesheets/active_admin.css.scss`:
28
36
@@ -36,10 +44,20 @@ Add the following line into `app/assets/javascripts/active_admin.js`:
36
44
//= require active_admin_datetimepicker
37
45
```
38
46
47
+
#### If you use Webpacker
48
+
Will be enough to run `bundle && yarn`, but if you want to install `jquery-datetimepicker` with different version just run `yarn add jquery-datetimepicker@^2.5.4`
49
+
#### If you use only Sprockets
50
+
You should make sure about presence the `jquery-datetimepicker` into `node_modules` and `node_modules` correct load to you project `config/initializers/assets.rb`:
-[Rails importing JavaScript packages from node_modules with assets pipeline(without webpacker](https://medium.com/@elicloudh/rails-importing-javascript-packages-from-node-modules-with-assets-pipeline-without-webpacker-98d985b22cea)
56
+
-[Rails 5.1, the proof of the maturity of the ecosystem](https://g3ortega.com/rails/2017/05/30/rails-5-1-and-forward-yarn-on-rails.html)
39
57
40
58
## Usage
41
59
42
-
This plugin adds the `date_time_picker` input and `date_time_range` filter, which use the [XDSoft DateTime Picker gem](https://github.com/shekibobo/xdan-datetimepicker-rails).
60
+
This plugin adds the `date_time_picker` input and `date_time_range` filter, which use the [XDSoft DateTime Picker NPM package](https://github.com/xdan/datetimepicker).
43
61
44
62
The `date_time_picker` input accepts many of the options available to the standard jQueryUI Datepicker. For example:
0 commit comments