<% condition_id = condition.try(:id) || condition[:id] %> <%# If the condition is not a refinements, it comes from the criterion form object, if it is a refinement it's still a hash %> <% if ['st', 'nst'].include? input[:clause] %> <% elsif ['exct', 'gt', 'lt'].include? input[:clause] %>
" data-input-key="days" data-action="input->refine--update#value blur->refine--update#refreshFromServer" data-input-id='<%= input_id if defined? input_id %>' />
<%= t("refine.refine_blueprints.clauses.date_condition.days") %>
<%= render partial: 'refine/blueprints/criterion_errors', locals: { criterion: criterion } %>
<% else %>
<%= render partial: "refine/blueprints/clauses/date_picker", locals: { criterion: criterion, label: t("refine.refine_blueprints.clauses.date_condition.first_date"), condition_id: condition_id, date: input[:date1], input_key: 'date1', input_id: defined?(input_id) && input_id, } %> <%= render partial: 'refine/blueprints/criterion_errors', locals: { criterion: criterion } %>
<% if (input[:clause] == 'btwn' || input[:clause] == 'nbtwn') %> <%= t("refine.refine_blueprints.clauses.date_condition.and") %>
<%= render partial: "refine/blueprints/clauses/date_picker", locals: { criterion: criterion, label: t("refine.refine_blueprints.clauses.date_condition.second_date"), condition_id: condition_id, date: input[:date2], input_key: 'date2', input_id: defined?(input_id) && input_id, } %>
<% end %> <% end %>