Sha256: 38daa0bdffad51fc0a2360ca17f53cb56a66caa2949d775bfbc27ef31fa4a66f

Contents?: true

Size: 1.43 KB

Versions: 4

Compression:

Stored size: 1.43 KB

Contents

<%= edit_field_wrapper field: @field, index: @index, form: @form, resource: @resource, displayed_in_modal: @displayed_in_modal do %>
  <%= content_tag :div, data: {
      controller: "date-field",
      date_field_view_value: @view,
      date_field_enable_time_value: true,
      date_field_picker_format_value: @field.picker_format,
      date_field_first_day_of_week_value: @field.first_day_of_week,
      date_field_disable_mobile_value: @field.disable_mobile,
      date_field_time24_hr_value: @field.time_24hr,
      date_field_timezone_value: @field.timezone,
  } do %>
    <%= datetime_field "fake_#{@field.id}", "fake",
      value: @field.edit_formatted_value,
      class: classes("w-full"),
      data: {
        'date-field-target': 'fakeInput',
        placeholder: @field.placeholder,
        **@field.get_html(:data, view: view, element: :input)
      },
      disabled: @field.readonly,
      placeholder: @field.placeholder,
      style: @field.get_html(:style, view: view, element: :input)
    %>
    <%= @form.text_field @field.id,
      value: @field.edit_formatted_value,
      class: classes("w-full hidden"),
      data: {
        'date-field-target': 'input',
        placeholder: @field.placeholder,
        **@field.get_html(:data, view: view, element: :input)
      },
      disabled: @field.readonly,
      placeholder: @field.placeholder,
      style: @field.get_html(:style, view: view, element: :input)
    %>
  <% end %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
avo-2.13.2.pre.2 app/components/avo/fields/date_time_field/edit_component.html.erb
avo-2.13.2.pre.1 app/components/avo/fields/date_time_field/edit_component.html.erb
avo-2.13.1 app/components/avo/fields/date_time_field/edit_component.html.erb
avo-2.13.0 app/components/avo/fields/date_time_field/edit_component.html.erb