<%= pb_content_tag(:div, class: object.classname + object.error_class) do %>
<% if content.present? %> <%= content %> <% else %> <%= pb_rails("text_input", props: { aria: object.input_aria, autocomplete: false, dark: object.dark, data: object.input_data, disabled: object.disable_input, error: object.error, id: object.picker_id, label: object.hide_label ? nil : object.label, margin_bottom: "none", name: object.name, placeholder: object.placeholder, required: object.required, }) %> <% end %> <% if object.selection_type == "quickpick" %> " name="<%= "#{object.start_date_name}" %>"> " name="<%= "#{object.end_date_name}" %>"> <% end %> <% if !object.hide_icon %>
<%= pb_rails("icon", props: { classname: "cal_icon", icon: "calendar-alt" }) %>
<% end %> <% if object.hide_icon && object.inline %>
<%= pb_rails("icon", props: { classname: "plus-icon", icon: "plus" }) %>
<%= pb_rails("icon", props: { classname: "angle_down_icon", icon: "angle-down" }) %>
<% end %>
<%= javascript_tag do %> window.addEventListener("DOMContentLoaded", () => { datePickerHelper(<%= object.date_picker_config %>, "<%= object.scroll_container %>") if (<%= object.selection_type == "quickpick" %>) { document.getElementById("<%= object.picker_id %>").addEventListener("change", ({ target }) => { const startDate = document.getElementById("<%= object.start_date_id %>") const endDate = document.getElementById("<%= object.end_date_id %>") const splittedValue = target.value.split(" to ") startDate.value = splittedValue[0] endDate.value = splittedValue[1] ? splittedValue[1] : splittedValue[0] }) } }) <% end %> <% end %>