egov_utils 0.1.30 → 0.1.31

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: b156823cd6f9cc1512decf286b7b826a16fde738986ec235b642a048b454cc7f
4
- data.tar.gz: 6f6654f25641de377698116f3fdb56ff2dcd418cb69bdfb0f0cba674bbc66554
3
+ metadata.gz: 27ad750ec0eb6ded622413a440bdb2f1101a26de3c7fd4a66cdd5c08d97cb3b4
4
+ data.tar.gz: a0566b02e854ac2901f959f10859521f2ce543b04baf252ea09e6d6cfef27f44
5
5
  SHA512:
6
- metadata.gz: 7627f74f56385fcb0d3da8d925913d6760282871b2dcdb14c38c5475c7e281d1c8ef1092a3800384bf573940a47a745894ad8d2b9c687d9431206bd9cf80aeda
7
- data.tar.gz: a07c38aed66d6e1161ff138b2e9da1b148b4b5fa9957629b33be863e12bd8c8ba514c644130d99bbeead54a5e8241acec67a088f8cfdbb0d36d44ee7edf3deec
6
+ metadata.gz: d46d1fc603c83b3142db3eae0d8f0ef484a3e728cedc7c7a66dfe5fb134f8f641b00800c17412346de2db300220afbbc2b84d79441dcaa1e978b08b8f749e211
7
+ data.tar.gz: bfd3b7ad36d208db0afaed81a6fdb29faa5da0acd3375ec6531895894730990a2de33a880272a4e8a131b3be798a5b5a2dcab82b8094d4ca839d8e1b163ed9e2
@@ -9,22 +9,25 @@ module BootstrapForm
9
9
  super
10
10
  end
11
11
 
12
- def datetime_field(name, *args)
13
- options = args.extract_options!.symbolize_keys!
14
- options[:datetimepicker] = true
15
- options[:append] = calendar_addon
16
- args << options
17
- super
18
- end
12
+ # def datetime_field(name, *args)
13
+ # options = args.extract_options!.symbolize_keys!
14
+ # options[:datetimepicker] = true
15
+ # options[:append] = calendar_addon
16
+ # args << options
17
+ # super
18
+ # end
19
19
 
20
20
  def datetime_local_field(name, *args)
21
21
  options = args.extract_options!.symbolize_keys!
22
22
  options[:datetimepicker] = true
23
+ options[:data] = {'date-extra-formats' => [BootstrapForm::DATE_FORMAT_JS+"THH:mm:ss"]}.merge(options[:data] || {})
23
24
  options[:append] = calendar_addon
24
25
  args << options
25
26
  super
26
27
  end
27
28
 
29
+ alias_method :datetime_field, :datetime_local_field
30
+
28
31
  private
29
32
 
30
33
  def calendar_addon
@@ -12,7 +12,7 @@ module EgovUtils
12
12
 
13
13
  def pickerize_options!
14
14
  options = @options.stringify_keys
15
- picker_data = {'provide' => 'datepicker', 'date-min-date' => format_date(datetime_value(options["min"])), 'date-max-date' => format_date(datetime_value(options["min"])) }
15
+ picker_data = {'provide' => 'datepicker', 'date-min-date' => format_date(datetime_value(options["min"])), 'date-max-date' => format_date(datetime_value(options["max"])) }
16
16
  @options[:data] = picker_data.merge(options['data'] || {})
17
17
  end
18
18
 
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.1.30'
2
+ VERSION = '0.1.31'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egov_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr