{% load adminlte_tags adminlte_filters %}


{% block form_date_input %}

  {% get_date_widget as DATE_WIDGET %}
  {% if DATE_WIDGET == 'bootstrap' or DATE_WIDGET == 'jquery' %}
    <div class="input-group">
      {% if field.datalist %}
        {{ field|with_class:"form-control"|with_placeholder|with_list:field.datalist.name }}
      {% else %}
        {{ field|with_class:"form-control"|with_placeholder }}
      {% endif %}

      <span class="input-group-addon" id="basic-addon1">
        <i class="glyphicon glyphicon-calendar"></i>
      </span>
    </div>
  {% else %}
    {% if field.datalist %}
      {{ field|with_class:"form-control"|with_placeholder|with_input_type:'date'|with_list:field.datalist.name }}
    {% else %}
      {{ field|with_class:"form-control"|with_placeholder|with_input_type:'date' }}
    {% endif %}
  {% endif %}

{% endblock form_date_input %}
