6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/simple_form_extension/inputs/date_time_input.rb', line 6
def input(wrapper_options = nil)
input_html_options[:class] << "form-control"
input_html_options[:data] ||= {}
input_html_options[:data].merge!(
:'date-format' => _translate('date.format'),
:'datetime-format' => _translate('datetime.format'),
:'week-start-day' => _translate('shared.week_start_day')
)
"<div class=\"input-group\">
#{@builder.text_field(attribute_name, input_html_options)}
<span class=\"input-group-btn\">
<button type=\"button\" class=\"btn btn-default datetimepicker-trigger\">
<i class=\"fa fa-calendar\"></i>
</button>
</span>
</div> ".html_safe
end
|