Sha256: b07bde470160b5f68405962a87e332783d51e493d1efde97fcc5c003ee9b0785
Contents?: true
Size: 1.18 KB
Versions: 17
Compression:
Stored size: 1.18 KB
Contents
<% yield %> <% stimulus_controller = 'fields--date' form ||= current_fields_form options ||= {} options[:id] ||= form.field_id(method) options[:class] = "form-control single-daterange w-full border-slate-300 dark:bg-slate-800 dark:border-slate-900 #{options[:class]}".strip options[:value] = form.object.send(method)&.strftime(t('global.formats.date')) options = options.merge({ data: {"#{stimulus_controller}-target": 'field' }}) other_options ||= {} %> <%= render 'shared/fields/field', form: form, method: method, options: options, other_options: other_options do %> <% content_for :field do %> <div class="date-input relative" data-controller="<%= stimulus_controller %>"> <%= form.text_field method, options %> <% unless options[:disabled] %> <button type="button" class="clear py-2 px-3 border border-transparent inline-flex items-center whitespace-nowrap absolute rounded-md top-1 md:top-0.5 right-0.5" data-<%= stimulus_controller %>-target="clearButton" data-action="<%= stimulus_controller %>#clearDate" > <i class="leading-4 text-lg ti ti-trash dark:text-blue-500"></i> </button> <% end %> </div> <% end %> <% end %>
Version data entries
17 entries across 17 versions & 1 rubygems