Sha256: b0b9c87ee89d084077539e68f724a2099edaf65f5479194dc444c762825a2ef0
Contents?: true
Size: 1.31 KB
Versions: 16
Compression:
Stored size: 1.31 KB
Contents
<% # formstrap/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 "formstrap/date", form: form, attribute: :date_of_birth %#> # <% end %#> flatpickr = Formstrap::FlatpickrView.new(local_assigns) %> <%= render "formstrap/date", flatpickr.options %>
Version data entries
16 entries across 16 versions & 1 rubygems