Skip to content

[Bug Report] datepicker selects multiple dates to report errors. #12323

@suqiuhui

Description

@suqiuhui

Element UI version

2.4.5

OS/Browsers version

windows10 / chrome等主流浏览器

Vue version

2.5.17

Reproduction Link

https://jsfiddle.net/4582fe73/2/

Steps to reproduce

点击多个日期选择框,选择目标日期后确定,然后点击选择框中的清除按钮,将刚刚选择的日期清除,然后重新选择,就会出现初步的交互不正常现象,重复操作的过程中可穿插点击页面空白处隐藏日期弹框,会看到日期不能再被选中及控制台报错现象(Uncaught TypeError: Cannot read property 'push' of null)
报错位置应该在date-table.vue文件的490行左右的 if (!cell.selected) {selectedDate.push(newDate);}处
image
image
image
image

What is Expected?

  1. 不要报错
  2. 日期可选中
  3. 像一般日期选择一样,点击空白处隐藏日期弹出框时刻获取到选中的日期,而非点击确定方可获取
  4. issue可粘贴图片以供方便清晰描述问题所在

What is actually happening?

  1. 交互存在不正确现在
  2. 继续操作会报错且日期不能再被选中

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions