英文:
how to make the date appear completely in vuejs-datepicker (z-index)
问题
问题:日期选择器未完全显示(我认为是z-index问题),我必须向下滚动!
英文:
I have a vuejs-datepicke
component in v-server-table component which is in collapse element
div.collapse > v-server-table.test-table > span > div.form-group > datepicker
<div :class="{ 'show' : (wheel.id == defaultOpenedWheel || searchKey !== null)}" class="collapse"
data-parent="#accordion"
role="tabpanel"
v-bind:aria-labelledby="'heading-'+index" v-bind:id="'collapse-'+index">
<v-server-table :columns="columnCompetences"
class="test-table"
:options="options"
:show-pagination="false"
@loaded="onLoaded"
v-bind:ref="'wheel_'+wheel.id"
v-bind:url="'/api/competences?wheelId='+wheel.id+'&querySearch='+searchKey+'&memberId='+memberId">
<span slot="target_date" slot-scope="{row}">
<span v-if="rowToShow !== 'row'+row.id">{{formDate(row.target_date)}}</span>
<div class="form-group" v-if="rowToShow === 'row'+row.id">
<datepicker :format="customDateFormat" :input-class="'form-control'"
v-model="updateRow.target_date"></datepicker>
<small class="form-text text-danger"
v-if="formErrors !== null && formErrors.target_date!==undefined"> {{formErrors.target_date[0]}} </small>
</div>
</span>
the problem : the datepicker is not completely shown (z-index problem I thinks) and I must to scroll-down !
答案1
得分: 1
尝试将以下内容添加到您的作用域样式中:
<style scoped>
>>> .vdp-datepicker__calendar {
position: fixed;
}
// 您的其他样式..
</style>
或者,如果您正在使用SCSS:
<style scoped lang="scss">
::v-deep .vdp-datepicker__calendar {
position: fixed;
}
// 您的其他样式..
</style>
英文:
Try this to add this to your scoped styles:
<style scoped >
>>> .vdp-datepicker__calendar {
position: fixed;
}
// Your other styles..
</style>
Or if you are using SCSS:
<style scoped lang="scss">
::v-deep .vdp-datepicker__calendar {
position: fixed;
}
// Your other styles..
</style>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论