<commit_before># Example
#
# = f.input :starts_at, as: :datetime_picker, input_html:
#   { data:
#     { date_format: "YYYY-MM-DD hh:mm A",
#       date_useminutes: false,
#       date_sidebyside: false,
#       date_mindate: Time.current.strftime('%Y-%m-%d')
#     }
#   }
#
# Refer to http://eonasdan.github.io/bootstrap-datetimepicker/#options
# for a full list of options
class DateTimePickerInput < SimpleForm::Inputs::StringInput
  def input(wrapper_options)
    input_html_options[:type] = "text"

    input_html_options[:data] ||= {}
    input_html_options[:data].reverse_merge!(
      date_format: picker_pattern,
      date_sidebyside: true
    )

    input_html_options[:value] ||= I18n.localize(attr_value, format: display_pattern) if attr_value.present?

    template.content_tag :div, class: "input-group date datetime_picker" do
      input = super(wrapper_options)
      input += template.content_tag :span, class: "input-group-btn" do
        template.content_tag :button, class: "btn btn-default", type: "button" do
          template.content_tag :i, "", class: "glyphicon glyphicon-calendar"
        end
      end<commit_msg>Update the usage documentation and also removed `date_sidebyside: true` from default options because:<commit_after># Example:
#
# = simple_form_for Event.new do |f|
#   = f.input :when, as: :date_time_picker, input_html: \
#     { data: \
#       { \
#         date_format: "YYYY-MM-DD hh:mm A", \
#         date_day_view_header_format: 'MMM YYYY', \
#         date_side_by_side: true, \
#         date_min_date: Time.current.strftime('%Y-%m-%d') \
#       } \
#     }
#
# Refer to http://eonasdan.github.io/bootstrap-datetimepicker/#options for a full list of options
#
class DateTimePickerInput < SimpleForm::Inputs::StringInput
  def input(wrapper_options)
    input_html_options[:type] = "text"

    input_html_options[:data] ||= {}
    input_html_options[:data].reverse_merge!(date_format: picker_pattern)

    input_html_options[:value] ||= I18n.localize(attr_value, format: display_pattern) if attr_value.present?

    template.content_tag :div, class: "input-group date datetime_picker" do
      input = super(wrapper_options)
      input += template.content_tag :span, class: "input-group-btn" do
        template.content_tag :button, class: "btn btn-default", type: "button" do
          template.content_tag :i, "", class: "glyphicon glyphicon-calendar"
        end
      end
{'fraction_non_alphanumeric': 0.1279835390946502, 'fraction_numerical': 0.0016460905349794238, 'mean_word_length': 3.6216730038022815, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3501379', 'n_tokens_mistral': 804, 'n_tokens_neox': 791, 'n_words': 165}