element icon indicating copy to clipboard operation
element copied to clipboard

DatePicker: fix handleClear #21301

Open duowb opened this issue 2 years ago • 0 comments

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);
      },

The code of month range may also have problems

duowb avatar Jul 28 '22 12:07 duowb