Element UI version
2.13.0
OS/Browsers version
chrome
Vue version
3.0.0-alpha.1
Reproduction Link
https://github.com/ElemeFE/element/blob/dev/packages/date-picker/src/panel/date-range.vue
Steps to reproduce
- set property 'picker-options' of date picker.
- I pick a startDate but left the picker panel after then ( means no endDate clicked in this case).
- when I try to choose a new date range, Twice clicks are needed to get the picker to right state
- cause you didn't reset the property 'rangeState.selecting' to default value 'false' after mouse leave event.
- I can only reset the value in @blur event by myself to fix the problem at the moment.
日期选择器,设置了pickOptions 可选时间段。
- 选中一个初试时间,但是不选结束时间,关闭日期选择界面。
- 重选的时候,必须要点两次,才能选中开始时间。
- 因为关闭日期选择面板的时候,你们源码中没有重置 rangeState.selecting 这个变量为 false。
- 我目前只能在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.
2条答案
按热度按时间xu3bshqb1#
Translation of this issue:
Element UI version
2.13.0
OS/Browsers version
Chrome
Vue version
3.0.0-alpha.1
Reproduction Link
https://github.com/ElemeFE/element/blob/dev/packages/date-picker/src/panel/date-range.vue
Steps to reproduce
Date selector, pickoptions optional time period is set.
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.
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.