Reputation: 65
I would like to change some styeles of Element UI date picker. for example, the popup is too far to the left, so I would like to move right a little.
I reference the original site and tried to adapt the code, however the style doesn't change. https://element-plus.org/en-US/component/date-picker.html#attributes
My code like this:
<template>
<el-date-picker v-model="value2" type="daterange" unlink-panels range-separator="〜"
start-placeholder="Start date" end-placeholder="End date" :shortcuts="shortcuts"
popper-class="my-popover" />
</template>
<style lang="scss" scoped>
::deep(.my-popover) {
padding: 1000px 30px;
background-color: #03cfb4;
left: 1000px !important;
}
</style>
Are there any misunderstandings of my code and the solutions? Thank you in advance!
my-popover is added like this:
Upvotes: 1
Views: 1317
Reputation: 65
I specified the following and it worked!
<template>
<el-date-picker v-model="value2" type="daterange" unlink-panels range-separator="〜"
start-placeholder="Start date" end-placeholder="End date" :shortcuts="shortcuts"
popper-class="my-popover" />
</template>
<style lang="scss">
.my-popover {
left: 250px !important;
}
</style>
Upvotes: 2