element [Bug Report] date picker state 'rangeState.selecting' needed to be reset to 'FALSE' after the picker panel closed.

62o28rlo  于 2022-11-13  发布在  其他
关注(0)|答案(2)|浏览(224)

Element UI version

2.13.0

OS/Browsers version

chrome

Vue version

3.0.0-alpha.1

https://github.com/ElemeFE/element/blob/dev/packages/date-picker/src/panel/date-range.vue

Steps to reproduce

  1. set property 'picker-options' of date picker.
  2. I pick a startDate but left the picker panel after then ( means no endDate clicked in this case).
  3. when I try to choose a new date range, Twice clicks are needed to get the picker to right state
  4. cause you didn't reset the property 'rangeState.selecting' to default value 'false' after mouse leave event.
  5. I can only reset the value in @blur event by myself to fix the problem at the moment.

日期选择器,设置了pickOptions 可选时间段。

  1. 选中一个初试时间,但是不选结束时间,关闭日期选择界面。
  2. 重选的时候,必须要点两次,才能选中开始时间。
  3. 因为关闭日期选择面板的时候,你们源码中没有重置 rangeState.selecting 这个变量为 false。
  4. 我目前只能在blur事件里自己重置 e.picker.rangeState.selecting = false 才能暂时修复这个问题。

What is Expected?

The property 'RangeState.selecting' have to be its default value 'FALSE' when date picker panel is closed each time.
每次关闭日期选择器,选中的状态属性需要重置。

What is actually happening?

wrong state value cause a problem when I try to pick a new date.

xu3bshqb

xu3bshqb1#

Translation of this issue:

Element UI version

2.13.0

OS/Browsers version

Chrome

Vue version

3.0.0-alpha.1

https://github.com/ElemeFE/element/blob/dev/packages/date-picker/src/panel/date-range.vue

Steps to reproduce

  1. set property 'picker-options' of date picker.
  2. I pick a startDate but left the picker panel after then ( means no endDate clicked in this case).
  3. when I try to choose a new date range, Twice clicks are needed to get the picker to right state
  4. cause you didn't reset the property 'rangeState.selecting' to default value 'false' after mouse leave event.
  5. I can only reset the value in @blur event by myself to fix the problem at the moment.

Date selector, pickoptions optional time period is set.

  1. Select an initial test time, but not the end time, and close the date selection interface.
  2. When re selecting, you must point twice to select the start time.
  3. Because when closing the date selection panel, the variable rangestate.selecting is not reset to false in your source code.
  4. At present, I can only temporarily fix this problem by resetting e.picker.rangestate.selecting = false in blur event.

What is Expected?

The property 'RangeState.selecting' have to be its default value 'FALSE' when date picker panel is closed each time.
Each time the date selector is closed, the selected status property needs to be reset.

What is actually happening?

wrong state value cause a problem when I try to pick a new date.

kmpatx3s

kmpatx3s2#

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

相关问题