Ant*_*ate 6 css z-index date-range angular ngx-daterangepicker-material
我在扩展中有多个表单,我正在使用此代码作为日期选择器,
<mat-form-field>
<input formControlName="date" matInput placeholder="Dátum" type="date">
</mat-form-field>
Run Code Online (Sandbox Code Playgroud)
哪个工作得很好,扩展并没有隐藏它(看看),但是我有日期和时间的开始和结束值,所以我切换到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>
Run Code Online (Sandbox Code Playgroud)
我试图给它一个自定义的 z-index,比如:
.md-drppicker {
z-index: 9999;
}
ngx-daterangepicker-material {
z-index: 9999;
}
Run Code Online (Sandbox Code Playgroud)
但这并没有解决问题,也尝试弄乱显示/位置,但我无法修复它。
知道出了什么问题吗?
您需要使用溢出属性,因为日历没有空间。我认为这会解决你的问题。
.md-drppicker {
z-index: 9999;
overflow: auto; // also try overflow-y;
}
ngx-daterangepicker-material {
z-index: 9999;
overflow: auto; // also try overflow-y;
}
Run Code Online (Sandbox Code Playgroud)
如果问题仍然存在,我建议您附加一个 stackblitz 实例。
| 归档时间: |
|
| 查看次数: |
1450 次 |
| 最近记录: |