my97-rails 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/my97-rails/my97_form_builder.rb +6 -6
- data/lib/my97-rails/version.rb +1 -1
- metadata +1 -1
@@ -107,15 +107,15 @@ module My97FormBuilder
|
|
107
107
|
def my97_datetime_select(field,options ={})
|
108
108
|
id = get_object_id(field, options)
|
109
109
|
#options[:class]="Wdate"
|
110
|
-
|
111
|
-
if options['
|
112
|
-
options['
|
110
|
+
datetime =
|
111
|
+
if options['start_time']
|
112
|
+
options['start_time']
|
113
113
|
elsif object.nil?
|
114
|
-
|
114
|
+
DateTime.now
|
115
115
|
else
|
116
116
|
object.send(field.to_sym)
|
117
117
|
end
|
118
|
-
|
118
|
+
datetime_picker_script = "<script type='text/javascript'>" +
|
119
119
|
"$('##{id}')" +
|
120
120
|
".focus( function() {
|
121
121
|
var options;
|
@@ -125,7 +125,7 @@ module My97FormBuilder
|
|
125
125
|
};
|
126
126
|
return WdatePicker($.extend(options, $(this).data()));
|
127
127
|
});" +"</script>"
|
128
|
-
return basic_datetime_select(field, options.merge(javascript:
|
128
|
+
return basic_datetime_select(field, options.merge(javascript: datetime_picker_script))
|
129
129
|
end
|
130
130
|
def basic_datetime_select(field, options = {})
|
131
131
|
placeholder_text = options[:placeholder_text] || ''
|
data/lib/my97-rails/version.rb
CHANGED