Sha256: 91d112b3ec58bd8a6a62c7f4dee758be856b0fc83b921955e317efb056f389b9
Contents?: true
Size: 1.33 KB
Versions: 3
Compression:
Stored size: 1.33 KB
Contents
<% # headmin/forms/flatpickr # # ==== Required parameters # * +attribute+ - Name of the attribute of the form model # * +form+ - Form object # # ==== Optional parameters # * +append+ - Display as input group with text on the right-hand side # * +float+ - Use floating labels. Defaults to false # * +flatpickr+ - Hash with all options you can pass to flatpickr JS config # * +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. # * +list+ - Options are passed through options_for_select # * +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 # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date # https://apidock.com/rails/ActionView/Helpers/FormHelper/date_field # # ==== Examples # Basic version # <%= form_with do |form| %#> # <%= render "headmin/forms/date", form: form, attribute: :date_of_birth %#> # <% end %#> flatpickr = Headmin::Form::FlatpickrView.new(local_assigns) %> <%= render 'headmin/forms/date', flatpickr.options %>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
headmin-0.4.2 | app/views/headmin/forms/_flatpickr.html.erb |
headmin-0.4.1 | app/views/headmin/forms/_flatpickr.html.erb |
headmin-0.4.0 | app/views/headmin/forms/_flatpickr.html.erb |