active_admin_datetimepicker 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37b0c7a60c75a42f97c60f8c49e759948fe12b8ac2690a4c9526ede227e0116c
|
4
|
+
data.tar.gz: fa8d55c00d7bcae667b2c93f3dd7c41e3f94c560fc2008a1c2e19bd49467339d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f716b3e7188f53333484d9c7d37dd35a792bd33bf8f978ac188854ac3affce37853069e51cce003f1544fb36b875640c550cb281450ba031ddcb2b4f91dcd675
|
7
|
+
data.tar.gz: 45d2d19f6be5feb0c98d42b70db2e4b58faccc9026c96de7e1f305429a2900b4b58ad61af04a453cda3ba525005391023b5f8c045d87122ea9f35b6d55afb203
|
data/Gemfile
CHANGED
@@ -18,7 +18,7 @@ module ActiveAdminDatetimepicker
|
|
18
18
|
options[:class] = [self.options[:class], html_class].compact.join(' ')
|
19
19
|
options[:data] ||= input_html_data
|
20
20
|
options[:data].merge!(datepicker_options: datetime_picker_options)
|
21
|
-
options[:value]
|
21
|
+
options[:value] = input_value(input_name)
|
22
22
|
options[:maxlength] = 19
|
23
23
|
options[:placeholder] = placeholder unless placeholder.nil?
|
24
24
|
end
|
@@ -26,8 +26,13 @@ module ActiveAdminDatetimepicker
|
|
26
26
|
|
27
27
|
def input_value(input_name = nil)
|
28
28
|
val = object.public_send(input_name || method)
|
29
|
-
|
30
|
-
|
29
|
+
if val.nil?
|
30
|
+
val
|
31
|
+
elsif column.type == :date
|
32
|
+
val
|
33
|
+
else
|
34
|
+
DateTime.new(val.year, val.month, val.day, val.hour, val.min, val.sec).strftime(format)
|
35
|
+
end
|
31
36
|
end
|
32
37
|
|
33
38
|
def datetime_picker_options
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_admin_datetimepicker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Fedoronchuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-rails
|