<div ng-app="myApp" class="popover">
  <h3 class="popover-title">Éditer l'attribut Calendar Event</h3>
  <div class="popover-content" style="width: 350px;">
    <div class="row">
      <div class="col-xs-10">
        <calendar-color res="field.config.color"></calendar-color>
      </div>
      <label>Bloqué</label>
      <div class="col-xs-2">
        <input
          type="checkbox"
          class="calendar_event_config_checkbox"
          ng-model="field.config.valid.color"
          ng-value="true"
          ng-change="change()"
          ng-disabled="!field.config.color"
        />
      </div>
    </div>
    <div class="row">
      <div class="col-xs-12">
        <label>Event type</label>
      </div>
      <div class="col-xs-10">
        <calendar-event-type
          id_event_type="field.config.type_evenement"
        ></calendar-event-type>
      </div>
      <div class="col-xs-2">
        <input
          type="checkbox"
          class="calendar_event_config_checkbox"
          ng-model="field.config.valid.type_evenement"
          ng-value="true"
          ng-disabled="!field.config.type_evenement&&field.config.type_evenement!=0"
        />
      </div>
    </div>

    <div class="row">
      <div class="col-xs-12">
        <label>Date Min et Max</label>
      </div>
      <div class="col-xs-10">
        <input
          type="text"
          class="form-control"
          ng-model="field.config.date_min"
          data-date-format="dd-MM-yyyy"
          model-date-format="yyyy-MM-ddTHH:mm:ss.sssZ"
          data-timezone="UTC"
          data-max-date="{{field.config.date_max}}"
          data-autoclose="true"
          placeholder="Date Min"
          bs-datepicker
        />
      </div>
      <div class="col-xs-2">
        <input
          type="checkbox"
          class="calendar_event_config_checkbox"
          ng-model="field.config.valid.date_min"
          ng-value="true"
          ng-disabled="!field.config.date_min"
        />
      </div>
      <div class="col-xs-10">
        <input
          type="text"
          class="form-control"
          ng-model="field.config.date_max"
          data-date-format="dd-MM-yyyy"
          model-date-format="yyyy-MM-ddTHH:mm:ss.sssZ"
          data-timezone="UTC"
          data-min-date="{{field.config.date_min}}"
          data-autoclose="true"
          placeholder="Date Max"
          bs-datepicker
        />
      </div>
      <div class="col-xs-2">
        <input
          type="checkbox"
          class="calendar_event_config_checkbox"
          ng-model="field.config.valid.date_max"
          ng-value="true"
          ng-disabled="!field.config.date_max"
        />
      </div>
    </div>
    <hr />
  </div>
</div>
