Sha256: 9b9597c390ae2c852adfc1d96b2affd8ac65272b8302a6d47464d80367ff7721
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
<% # headmin/forms/datetime_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/datetime_range # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datetime-local # https://apidock.com/rails/ActionView/Helpers/FormHelper/datetime_field # # ==== Examples # Basic version # <%= form_with do |form| %#> # <%= render 'headmin/forms/datetime_range', form: form, start: {attribute: :start_date}, end: {attribute: :end_date} %#> # <% end %#> datetime_range = Headmin::Form::DatetimeRangeView.new(local_assigns) %> <div class="row"> <div class="col"> <%= render 'headmin/forms/datetime', datetime_range.start_options %> </div> <div class="col"> <%= render 'headmin/forms/datetime', datetime_range.end_options %> </div> </div>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
headmin-0.5.2 | app/views/headmin/forms/_datetime_range.html.erb |