<% yield %> <% stimulus_controller = 'fields--date' form ||= current_fields_form options ||= {} options[:id] ||= id_for(form, method) options[:class] = "form-control single-daterange w-full border-gray-300 dark:bg-darkPrimary-800 dark:border-darkPrimary-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 %>
<%= form.text_field method, options %> <% unless options[:disabled] %> <% end %>
<% end %> <% end %>