Element: date-picker :clearable="false" not work with type="datetimerange"

Created on 7 Mar 2018  ·  6Comments  ·  Source: ElemeFE/element

Element UI version

2.2.1

OS/Browsers version

win10 google & firefox

Vue version

2.5.13

Reproduction Link

https://jsfiddle.net/ng347h9m/1/

Steps to reproduce

1.use el-date-picker
2.set type as datetimerange
3.set clearable as false

What is Expected?

the clear button appeared and clickable

What is actually happening?

this clear button should not appear

question

Most helpful comment

You can hide the Clear button by using the below css snippet. it's a hack though 😞

<style scoped>
button.el-button.el-picker-panel__link-btn.el-button--text.el-button--mini {
  display: none;
}
</style>

All 6 comments

If you add a clearable prop for an element, the clearable value will be true. If you want to set this prop as false, you should add :clearable="false" for the component.

Update example here: https://jsfiddle.net/mmx38qxw/476/

@furybean im using :clearable="false" certainly

sorry for the code was wrong, however the issue can be reproduced

i just updated the code, and u can see in
https://jsfiddle.net/ng347h9m/1/

  • :clearable="false" means there is no clear button
  • :clearable="true" means there is clear button

Your demo behaves correctly.

By "clear button", we mean this one:
image

You can hide the Clear button by using the below css snippet. it's a hack though 😞

<style scoped>
button.el-button.el-picker-panel__link-btn.el-button--text.el-button--mini {
  display: none;
}
</style>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

fscardua picture fscardua  ·  3Comments

gengxuelei picture gengxuelei  ·  3Comments

no5no6 picture no5no6  ·  3Comments

chao-hua picture chao-hua  ·  3Comments

dbskccc picture dbskccc  ·  3Comments