datetimepicker 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ Time::DATE_FORMATS[:datetimepicker_date] = "%Y/%m/%d"
2
+ Time::DATE_FORMATS[:datetimepicker_time] = "%H:%M"
@@ -0,0 +1,5 @@
1
+ module Datetimepicker
2
+ class Engine < Rails::Engine
3
+ # auto wire for app/assets
4
+ end
5
+ end
@@ -0,0 +1,29 @@
1
+ module SimpleForm
2
+ module Inputs
3
+
4
+ class DatetimepickerInput < Base
5
+ def input
6
+ multiple_inputs_buffer = ""
7
+
8
+ # Build the CSS and input necessary for datetimepicker_date
9
+ input_html_classes.push(partial_input_name(:date))
10
+ multiple_inputs_buffer << @builder.text_field("#{attribute_name}_#{partial_input_name(:date)}", input_html_options)
11
+ input_html_classes.delete(partial_input_name(:date))
12
+
13
+ # Build the CSS and input necessary for datetimepicker_time
14
+ input_html_classes.push(partial_input_name(:time))
15
+ multiple_inputs_buffer << @builder.text_field("#{attribute_name}_#{partial_input_name(:time)}", input_html_options)
16
+ input_html_classes.delete(partial_input_name(:time))
17
+
18
+ return multiple_inputs_buffer
19
+ end
20
+
21
+ private
22
+
23
+ def partial_input_name(which_input)
24
+ "datetimepicker_#{which_input}"
25
+ end
26
+ end
27
+
28
+ end
29
+ end
@@ -0,0 +1,3 @@
1
+ module Datetimepicker
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: datetimepicker
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Daniel Ott
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-11 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Custom field for individual setting of date and time for Rails :datetime
15
+ attributes.
16
+ email:
17
+ - danott@marshill.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - Gemfile
23
+ - LICENSE
24
+ - README.md
25
+ - Rakefile
26
+ - app/assets/javascripts/datetimepicker.js.coffee
27
+ - app/assets/javascripts/datetimepicker/bootstrap_datepicker.js
28
+ - app/assets/javascripts/datetimepicker/bootstrap_timepicker.js
29
+ - app/assets/stylesheets/_datetimepicker.css.scss
30
+ - app/assets/stylesheets/datetimepicker/bootstrap_datepicker.css
31
+ - app/assets/stylesheets/datetimepicker/bootstrap_timepicker.css
32
+ - datetimepicker.gemspec
33
+ - lib/datetimepicker.rb
34
+ - lib/datetimepicker/activerecord.rb
35
+ - lib/datetimepicker/date_and_time_manipulator.rb
36
+ - lib/datetimepicker/date_formats.rb
37
+ - lib/datetimepicker/engine.rb
38
+ - lib/datetimepicker/simple_form/inputs/datetimepicker_input.rb
39
+ - lib/datetimepicker/version.rb
40
+ homepage: ''
41
+ licenses: []
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 1.8.17
61
+ signing_key:
62
+ specification_version: 3
63
+ summary: Custom field for individual setting of date and time for Rails :datetime
64
+ attributes.
65
+ test_files: []