Skip to content

Commit 2f9b0c9

Browse files
committed
Update README.md
1 parent c06e13c commit 2f9b0c9

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

README.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,29 @@ Or install it yourself as:
2020

2121
## Usage
2222

23+
Plugin offers the `date_time_picker` input and `date_time_range` filter , which use the [XDSoft DateTime Picker gem](https://github.com/shekibobo/xdan-datetimepicker-rails).
24+
The `date_time_picker` input accepts many of the options available to the standard jQueryUI Datepicker. For example:
2325

26+
JS asset
27+
```//= require active_admin_datetimepicker```
28+
29+
CSS
30+
```@import "active_admin_datetimepicker";```
31+
32+
33+
```ruby
34+
form do |f|
35+
f.input :starts_at, as: :datepicker, datepicker_options: { min_date: "2013-10-8", max_date: "+3D" }
36+
f.input :ends_at, as: :datepicker, datepicker_options: { min_date: 3.days.ago.to_date, max_date: "+1W +5D" }
37+
end
38+
```
39+
40+
```ruby
41+
filter :created_at, as: :date_time_range
42+
```
43+
44+
See [the datetimepicker documentation for more details](http://xdsoft.net/jqplugins/datetimepicker/).
2445

25-
+
26-
+plugin offers the `date_time_picker` input and `date_time_range` filter , which use the [XDSoft DateTime Picker gem](https://github.com/shekibobo/xdan-datetimepicker-rails).
27-
+The `date_time_picker` input accepts many of the options available to the standard jQueryUI Datepicker. For example:
28-
+
29-
+ JS asset
30-
+ ```//= require active_admin_datetimepicker```
31-
+
32-
+ SASS
33-
+ ```@import "active_admin_datetimepicker";```
34-
+
35-
+```ruby
36-
+form do |f|
37-
+ f.input :starts_at, as: :datepicker, datepicker_options: { min_date: "2013-10-8", max_date: "+3D" }
38-
+ f.input :ends_at, as: :datepicker, datepicker_options: { min_date: 3.days.ago.to_date, max_date: "+1W +5D" }
39-
+end
40-
+```
41-
+
42-
+```ruby
43-
+filter :created_at, as: :date_time_range
44-
+```
45-
+
46-
+See [the datetimepicker documentation for more details](http://xdsoft.net/jqplugins/datetimepicker/).
47-
+
4846

4947
## Development
5048

0 commit comments

Comments
 (0)