<form [formGroup]="form">
  <div class="p-3 space-y-4">
    <div class="flex flex-row justify-between w-full">
      <div class="flex flex-col w-full">
        <mat-radio-group formControlName="is_delete">
          <mat-radio-button class="example-margin" [value]="true">สร้างข้อสอบใหม่ทั้งหมด</mat-radio-button>
          <mat-radio-button class="example-margin" [value]="false">สร้างข้อสอบเฉพาะคนที่ไม่มีข้อสอบ</mat-radio-button>
        </mat-radio-group>
      </div>
    </div>
    <div class="flex flex-row justify-between w-full">
      <!-- <div class="flex flex-col w-48% ">
        <label>วันที่เริ่มต้น</label>
        <mat-form-field>
          <input matInput [matDatepicker]="picker" [max]="maxDate" [(ngModel)]="query.from_date">
          <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
          <mat-datepicker #picker></mat-datepicker>
        </mat-form-field>
      </div>

      <div class="flex flex-col w-48% ">
        <label>วันที่สิ้นสุด</label>
        <mat-form-field>
          <input matInput [matDatepicker]="picker1" [(ngModel)]="query.to_date">
          <mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>
          <mat-datepicker #picker1></mat-datepicker>
        </mat-form-field>
      </div> -->

<!--      <div class="flex flex-col w-full">-->
<!--        <label>รอบสอบ</label>-->
<!--        <input #res type="text" [matAutocomplete]="auto3" formControlName="testing_information_uid" [disabled]="data">-->
<!--        <mat-autocomplete #auto3="matAutocomplete" [displayWith]="display.bind(this)">-->
<!--          <mat-option>-->
<!--            &#45;&#45;กรุณาเลือก&#45;&#45;-->
<!--          </mat-option>-->
<!--          <mat-option *ngFor="let x of testingInfomation | searchAuto : res.value : 'testing_information_name'" [value]="x.testing_information_uid"  (onSelectionChange)="setDate(x)">-->
<!--            {{x.testing_information_name}}-->
<!--          </mat-option>-->
<!--        </mat-autocomplete>-->
<!--      </div>-->
      <div class="flex flex-col w-full">
        <label>รอบสอบ</label>
        <select formControlName="testing_information_uid" (ngModelChange)="setDate($event)" disabled>
          <option *ngFor="let x of testingInfomation" [ngValue]="x.testing_information_uid">
            {{x.testing_information_name}}
          </option>
        </select>
      </div>
    </div>


    <div class="flex flex-row justify-center mt-3 w-full ">
      <button class="search-button mr-3" [disabled]="!isCanSync" (click)="save()">สร้างข้อสอบ</button>
      <button class="clear-button" (click)="cancel()">ยกเลิก</button>
    </div>

    <div *ngIf="isCanDetail !== null">
      หมายเหตุ : <p>{{isCanDetail}}</p>
    </div>

  </div>
</form>
<!--    <pre>{{query | json}}</pre>-->
<!--<pre>{{form.getRawValue() | json}}</pre>-->

