Skip to content

Commit 9404671

Browse files
authored
Merge pull request #47 from sunny/patch-1
Minor README fixes
2 parents e12c47f + cdd38c4 commit 9404671

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
# ActiveAdminDatetimepicker
66

7-
Adds ability to use XDSoft's DateTime picker as the `date_time_picker` input for forms, and `date_time_range` for filters
8-
7+
Adds XDSoft's DateTime picker as a `date_time_picker` input for forms, and `date_time_range` for filters.
98

109
![ActiveAdminDatetimepicker](https://raw.githubusercontent.com/ActiveAdminPlugins/activeadmin_datetimepicker/master/screen/screen.png "ActiveAdminDatetimepicker")
1110

1211
## Installation
1312

14-
Add this line to your application's Gemfile:
13+
Add this line to your application's `Gemfile`:
1514

1615
```ruby
1716
gem 'active_admin_datetimepicker'
@@ -25,13 +24,13 @@ Or install it yourself as:
2524

2625
$ gem install active_admin_datetimepicker
2726

28-
Add following line into `app/assets/stylesheets/active_admin.css.scss`
27+
Add the following line into `app/assets/stylesheets/active_admin.css.scss`:
2928

3029
```css
3130
@import "active_admin_datetimepicker";
3231
```
3332

34-
Add following line into `app/assets/javascripts/active_admin.js.coffee`
33+
Add the following line into `app/assets/javascripts/active_admin.js.coffee`:
3534

3635
```coffee
3736
#= require active_admin_datetimepicker
@@ -40,7 +39,8 @@ Add following line into `app/assets/javascripts/active_admin.js.coffee`
4039

4140
## Usage
4241

43-
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).
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).
43+
4444
The `date_time_picker` input accepts many of the options available to the standard jQueryUI Datepicker. For example:
4545

4646
```ruby
@@ -57,19 +57,20 @@ The `date_time_picker` input accepts many of the options available to the standa
5757
## Override behaviour in initializer
5858

5959
```ruby
60-
# This if for front-end javascript side
60+
# This if for the front-end JavaScript side
6161
ActiveAdminDatetimepicker::Base.default_datetime_picker_options = {
6262
defaultDate: proc { Time.current.strftime("%Y-%m-%d 00:00") }
6363
}
64-
# This if for backend(Ruby)
64+
# This if for the Ruby backend
6565
ActiveAdminDatetimepicker::Base.format = "%Y-%m-%d %H:%M:%S"
6666
```
6767

6868
## Change datetime format
69-
If you want to change format - you need to make sure that front-end and back-end formats are identical.
70-
And remember JS and Ruby datetime format has different syntax.
7169

72-
Create configuration file `/config/initializers/init_datetimpicker.rb`
70+
If you want to change the format you need to make sure that front-end and back-end formats are identical.
71+
And remember JS and Ruby datetime format have different syntaxes.
72+
73+
Create configuration file `config/initializers/init_datetimepicker.rb`:
7374

7475
```ruby
7576
# Example "11/03/2016 13:00"

0 commit comments

Comments
 (0)