gitcoinco/code_fund_ads

View on GitHub
app/views/shared/_date_range_picker.html.erb

Summary

Maintainability
Test Coverage
<%= form_tag nil, method: :get, autocomplete: "off", class: "ml-3", style: "width: 200px;" do %>
  <div class="w-auto input-group input-group-sm" style="height: 40px;">
    <div class="input-group-prepend">
      <span class="input-group-text border-0 text-primary">
        <span class="fas fa-calendar"></span>
      </span>
    </div>
    <input type="text"
      name="date_range"
      aria-label="date range selector"
      class="form-control border-0 text-primary"
      data-controller="select-date-range"
      data-action="cf:date-range-selected->select-date-range#submit"
      data-opens="left"
      data-start-date="<%= @start_date.to_s("mm/dd/yyyy") %>"
      data-end-date="<%= @end_date.to_s("mm/dd/yyyy") %>" />
  </div>
<% end %>