in ejs dropdown list value is not comming

import { ComponentOnInitViewChild } from '@angular/core';
import { DialogComponent } from '@syncfusion/ej2-angular-popups';
import { DocumentService } from '../../service/data/document.service';


@Component({
  selector: 'app-perform-checks',
  templateUrl: './perform-checks.component.html',
  styleUrls: ['./perform-checks.component.css']
})
export class PerformChecksComponent implements OnInit {
  @ViewChild('matchupTemplateDialog'matchupTemplateDialogDialogComponent;
  attributeName1=[];
  tesData112 = [];
  checklistData=[];


  constructor(private documentServiceDocumentService) { }

  ngOnInit() {
    this.checkList();
  }
  updateMatchupClick() {
    this.matchupTemplateDialog.show();
  }

  checkList() {
    this.documentService.getAllCheckListData().subscribe(response => {
      this.checklistData = response;

for(let i=0;i<this.checklistData.length;i++)
{
  this.attributeName1=this.checklistData[i].attributeName1;
  console.log(this.attributeName1+"kkkkkkkkkkkkk")
}

  })
  }

}

<div class="col-md-12">
  <button ejs-button cssClass="e-info" (click)="updateMatchupClick()">Perform Checks</button>
</div>

<ejs-dialog showCloseIcon='true' #matchupTemplateDialog width='600px' height='auto' isModal='true' [visible]='false'>
  <form id="ngFormID" #runMatchup="ngForm" novalidate>
    <div class="card">
      <div class="card-body">
       <ng-template #header>
          RUN CHECKS
        </ng-template>

        <ng-template #content>

          <div fxFlexFill class="flex-container" fxLayout="row" fxLayout.xs="column" fxLayoutGap="20px"
            fxLayoutAlign="start" [style.margin-bottom]="'20px'">
            <div fxFlex class="child-1">

              <ejs-multiselect floatLabelType="Always" id='multiselect-checkbox' name='parentAgreementType' #checkbox
                [dataSource]='dataTest' placeholder='Select Child Document' [fields]='checkFields' [mode]='mode'
                [popupHeight]='popHeight' [showDropDownIcon]='true' showSelectAll='true'
                [filterBarPlaceholder]='filterPlaceholder' ngModel>
              </ejs-multiselect>

            </div>
            <div fxFlex class="child-2">
              <ejs-dropdownlist floatLabelType="Always" id='attributeName1' name="attributeName1"
                [dataSource]='checklistData' placeholder='Select Attribute Name' popupHeight='200px' ngModel>
              </ejs-dropdownlist>
            </div>
          </div>

          <div fxFlexFill class="flex-container" fxLayout="row" fxLayout.xs="column" fxLayoutGap="20px"
            fxLayoutAlign="start" [style.margin-bottom]="'20px'">
            <div fxFlex class="child-3">
              <ejs-dropdownlist floatLabelType="Always" id='parentDocument' name="parentDocument"
                [dataSource]='agreementTypeDatas1' placeholder='Select Child Parent Document' popupHeight='200px'
                ngModel>
              </ejs-dropdownlist>
            </div>
          </div>

        </ng-template>

        <ng-template #footerTemplate>
          <div style="text-align: center;">
            <button ejs-button cssClass="e-primary" content="Run Matchup" type="submit"
              (click)="onRunMatchupClick(runMatchup)">Run Matchup</button>
          </div>
        </ng-template>
      </div>
    </div>
  </form>
</ejs-dialog>
<br><br>
<!-- Syncfusion grid data -->
<div class="control-section">
  <ejs-grid #grid >
    <e-columns>
      <e-column id='checkName' field='checkName' headerText='Check Name'
     [allowFiltering]='true' [ignoreAccent]='true' filterBarPlaceholder='e.g: 10001'>
      </e-column>
      <e-column field='date' headerText='Date' width='180' [allowEditing]="false"></e-column>
      <e-column field='status' headerText='Status' width='100' [allowEditing]="false"></e-column>
        </e-columns>
  </ejs-grid>
</div>

1 Reply

DR Deepak Ramakrishnan Syncfusion Team October 8, 2021 12:58 PM UTC

Hi Ignacio, 
 
Thanks for your update. 
 
Query 1:  I've seen that I preload the dates as a string, that's why it didn´t like to the component but it worked 
 
We need to provide the start date and end date in the required type (DateTime) . It is the correct usage of binding values to the component . For your reference kindly refer the below API documentation. 
 
 
 
Also we suggest you bind the values as like sample provided in the  last update(also attached below) 
 
 
export class AppComponent { 
 
    public seprator: string = ","; 
    public date: Object = new Date() 
public Start: Date = new Date(2021,9,1); 
public end: Date = new Date(2021,9,10); 
    constructor( ) { 
         
    } 
 
} 
 
 
Also you can use separator for the end date and start date using ‘separator property as like above code , which will displayed like below 
 
 
 
 
Query 2: Is there a way to disable date format check? 
 
We have already considered the above requirement as feature request in our end . And this will be available in any of our upcoming future releases. we will consider the feature and implement in the certain release based on the customer request count and priority. So, we will intimate you once the road map has been prepared. You can track the status of the feature from the below feedback link. 
    
 
 
Thanks, 
Deepak R. 


Loader.
Up arrow icon