Sha256: 000cd7a06086088c523fad2f81ad8f225f8185a73d6cb6288e0186556a92cc57

Contents?: true

Size: 1.48 KB

Versions: 16

Compression:

Stored size: 1.48 KB

Contents

<%
  # formstrap/date_range
  #
  # ==== Required parameters
  # * +form+ - Form object
  # * +start+ - Hash with all options for the start date input (:attribute is required)
  # * +end+ - Hash with all options for the end date input (:attribute is required)
  #
  # ==== Optional parameters
  # * +append+ - Display as input group with text on the right-hand side
  # * +float+ - Use floating labels. Defaults to false
  # * +hint+ - Informative text to assist with data input. HTML markup is allowed.
  # * +label+ - Text to display inside label tag. Defaults to the attribute name. Set to false if you don"t want to show a label.
  # * +plaintext+ - Render input as plain text.
  # * +prepend+ - Display as input group with text on the left-hand side
  # * +wrapper+ - Hash with all options for the surrounding html tag
  #
  # ==== References
  # https://headmin.dev/docs/forms/date_range
  # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/date
  # https://apidock.com/rails/ActionView/Helpers/FormHelper/date_field
  #
  # ==== Examples
  #   Basic version
  #   <%= form_with do |form| %#>
  #     <%= render "formstrap/date_range", form: form, start: {attribute: :start_date}, end: {attribute: :end_date} %#>
  #   <% end %#>

  date_range = Formstrap::DateRangeView.new(local_assigns)
%>

<div class="row">
  <div class="col">
    <%= render "formstrap/date", date_range.start_options %>
  </div>
  <div class="col">
    <%= render "formstrap/date", date_range.end_options %>
  </div>
</div>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
formstrap-0.4.5 app/views/formstrap/_date_range.html.erb
formstrap-0.4.4 app/views/formstrap/_date_range.html.erb
formstrap-0.4.3 app/views/formstrap/_date_range.html.erb
formstrap-0.4.2 app/views/formstrap/_date_range.html.erb
formstrap-0.3.5 app/views/formstrap/_date_range.html.erb
formstrap-0.3.4 app/views/formstrap/_date_range.html.erb
formstrap-0.3.3 app/views/formstrap/_date_range.html.erb
formstrap-0.3.2 app/views/formstrap/_date_range.html.erb
formstrap-0.3.1 app/views/formstrap/_date_range.html.erb
formstrap-0.3.0 app/views/formstrap/_date_range.html.erb
formstrap-0.2.1 app/views/formstrap/_date_range.html.erb
formstrap-0.2.0 app/views/formstrap/_date_range.html.erb
formstrap-0.1.3 app/views/formstrap/_date_range.html.erb
formstrap-0.1.2 app/views/formstrap/_date_range.html.erb
formstrap-0.1.1 app/views/formstrap/_date_range.html.erb
formstrap-0.1.0 app/views/formstrap/_date_range.html.erb