我在扩展中具有多种形式,并且我正在使用此代码作为日期选择器,
<mat-form-field>
<input formControlName="date" matInput placeholder="Dátum" type="date">
</mat-form-field>
这完全可以正常工作,扩展名不会隐藏它(have a look),但是后来我有了日期和时间的开始和结束值,所以我切换到了[[ngx material daterangepicker。
我唯一的问题是扩展隐藏了daterangepicker (have a look),因此daterangepickers代码看起来像这样: <mat-form-field>
<input
matInput
ngxDaterangepickerMd
name="daterange"
placeholder="Choose date"
applyLabel="Okay"
startKey="start"
endKey="end"
firstMonthDayClass="first-day"
lastMonthDayClass="last-day"
emptyWeekRowClass="empty-week"
lastDayOfPreviousMonthClass="last-previous-day"
firstDayOfNextMonthClass="first-next-day"
[autoApply]="options.autoApply"
[linkedCalendars]="options.linkedCalendars"
[singleDatePicker]="options.singleDatePicker"
[showDropdowns]="true"
formControlName="date"
[showWeekNumbers]="options.showWeekNumbers"
[showCancel]="options.showCancel"
[showClearButton]="options.showClearButton"
[showISOWeekNumbers]="options.showISOWeekNumbers"
[customRangeDirection]="options.customRangeDirection"
[lockStartDate]="options.lockStartDate"
[closeOnAutoApply]="options.closeOnAutoApply"
[opens]="opens"
[drops]="drops"
[timePicker]="timePicker"
/>
</mat-form-field>
我试图给它一个自定义的z-index,例如:
.md-drppicker { z-index: 9999; } ngx-daterangepicker-material { z-index: 9999; }
但是那并不能解决问题,也试图弄乱显示/位置,但是我无法解决。知道有什么问题吗?
.md-drppicker {
z-index: 9999;
overflow: auto; // also try overflow-y;
}
ngx-daterangepicker-material {
z-index: 9999;
overflow: auto; // also try overflow-y;
}
如果问题仍然存在,我建议您附加一个stackblitz实例。