2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'app/inputs/date_picker_input.rb', line 2
def input(wrapper_options)
set_html_options
set_value_html_option
classes = ["input-group"]
input_html_options[:data] ||= {}
input_html_options[:data]["controller"] = "flatpickr"
picker_options = (options[:picker] || {}).merge!(flatpickr_options)
picker_options.each do |k, v|
input_html_options[:data]["flatpickr-#{k}-value"] = v
end
input_html_options[:data]["flatpickr-locale-value"] = I18n.locale
classes.push("input-group-sm") if input_html_options[:class].include? "input-sm"
input = super(wrapper_options) end
|