简体   繁体   中英

how to make the date appear completely in vuejs-datepicker (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 !

在此处输入图片说明

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM