{% load adminlte_tags adminlte_filters %}


{% block form_date_time_input %}

  {% get_datetime_widget as DATETIME_WIDGET %}
  {% if DATETIME_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>
        <i class="glyphicon glyphicon-time"></i>
      </span>
    </div>
  {% else %}
    {% if field.datalist %}
      {{ field|with_class:"form-control"|with_placeholder|with_input_type:'datetime-local'|with_list:field.datalist.name }}
    {% else %}
      {{ field|with_class:"form-control"|with_placeholder|with_input_type:'datetime-local' }}
    {% endif %}
  {% endif %}

{% endblock form_date_time_input %}
