当我在页面上的输入文本字段上按Enter键时,它将打开我的ngx-bootstrap日期选择器。下面是我的代码。以及为什么会这样吗?
<div class="form-group">
<label class="label">CE Location Code<span class="text-danger">*</span></label>
<div class="input-group">
<input type="text" class="form-control" placeholder="CE Location Code" formControlName="opaCode">
</div>
<div *ngIf="submitted && f.opaCode.errors" class="text-danger">
<p>{{f.opaCode.hasError('required') ? 'This is required':'Invailid data'}}</p>
</div>
</div>
<div class="form-group">
<label class="label">Effective Date</label>
<div class="input-group">
<input class="form-control" #dp="bsDatepicker" bsDatepicker maxlength="10" placeholder="MM/DD/YYYY"
formControlName="programStartDate" [bsConfig]="{containerClass: 'theme-blue' }">
<div class="input-group-appened">
<button class="btn fa fa-calendar " (click)="dp.toggle()"></button>
</div>
</div>
</div>