Skip to content

Commit

Permalink
fix: When the clearable property of DateTimePicker is set to false, i…
Browse files Browse the repository at this point in the history
…t is not possible to hide the clear button in the popup layer.
  • Loading branch information
wangdaodao committed Nov 12, 2024
1 parent c345bb4 commit fd3c188
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/date-picker/src/panel/date-range.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
</div>
<div class="el-picker-panel__footer" v-if="showTime">
<el-button
v-if="clearable"
size="mini"
type="text"
class="el-picker-panel__link-btn"
Expand Down
1 change: 1 addition & 0 deletions packages/date-picker/src/picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ export default {
this.picker.selectionMode = this.selectionMode;
this.picker.unlinkPanels = this.unlinkPanels;
this.picker.arrowControl = this.arrowControl || this.timeArrowControl || false;
this.picker.clearable = this.clearable;
this.$watch('format', (format) => {
this.picker.format = format;
});
Expand Down
4 changes: 4 additions & 0 deletions packages/date-picker/src/picker/date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export default {
type: String,
default: 'date'
},
clearable: {
type: Boolean,
default: true
},
timeArrowControl: Boolean
},

Expand Down

0 comments on commit fd3c188

Please sign in to comment.