Skip to content

Blur on DateInput of Picker of DatePicker/RangePicker will show unexpected date in DateInput #2246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
xszh opened this issue May 15, 2020 · 1 comment
Closed
1 task done
Labels

Comments

@xszh
Copy link

xszh commented May 15, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.5.5

Environment

Win10, Chrome, Vue2.6

Reproduction link

Edit on CodeSandbox

Steps to reproduce

For Date Picker:

  1. Open Date Picker Popup by click Date Picker
  2. Focus InputBox of popup, which is blank now
  3. Click any white place of the popup without trigger the change

For Date Range Picker

  1. Open Date Range Picker Popup by click
  2. Picker some date range
  3. Focus out to make popup collapsed
  4. Re-open Date Range Picker Popup
  5. Focus into End date InputBox, which is the selected end date in DatePicker #2
  6. Click any white place of the popup without trigger the change

What is expected?

For Date Picker:
Should keep empty as nothing filled

For Date Range Picker
Should keep last selection date range

What is actually happening?

For Date Picker:
Show today when blur the input

For Date Range Picker
Show today 1 month when blur the end date input (Note that this change will not affect real value of the control)


简单看了下源码,应该是控件会默认一个时间/时间范围给picker,这个时间/时间范围是用来显示calendar的。同时DateInput也会拿这个作为显示,但是这个显示貌似只会在blur的时候真正显示在输入框里,也不会真的变更控件之前的值。

P.S.官网doc的默认示例也有这个问题,应该和使用方式无关

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants