element
element copied to clipboard
DatePicker: fix handleClear #21301
datetimepick selects only one date. When it is cleared, clicking again is invalid #21301
Please make sure these boxes are checked before submitting your PR, thank you!
- [x] Make sure you follow Element's contributing guide (中文 | English | Español | Français).
- [x] Make sure you are merging your commits to
dev
branch. - [x] Add some descriptions and refer relative issues for you PR.
fix: #21301
or
handleClear() {
this.minDate = null;
this.maxDate = null;
this.rangeState.selecting = false;
this.leftDate = calcDefaultValue(this.defaultValue)[0];
this.rightDate = nextMonth(this.leftDate);
this.$emit('pick', null);
},