Skip to content
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

DatePicker日期选择框 初始化赋值 清空依然存在问题 #7534

Closed
232650413 opened this issue Jun 27, 2022 · 3 comments
Closed

DatePicker日期选择框 初始化赋值 清空依然存在问题 #7534

232650413 opened this issue Jun 27, 2022 · 3 comments
Assignees

Comments

@232650413
Copy link

Reproduction link

https://angular-aev8a1.stackblitz.io

Steps to reproduce

DatePicker日期选择框 初始化赋值,点击右边清空按钮依然无法清空。有时好像延时好几秒后清除掉,有时点击清除无效;
除非点开面板重新赋值 ,方可实时清空。
nz-range-picker 好像点击后5-10秒自动清空
nz-date-picker 纯粹点击无法清空

What is expected?

DatePicker日期选择框 初始化赋值 实时清空。

What is actually happening?

DatePicker日期选择框 初始化赋值,点击右边清空按钮依然无法清空。

Environment Info
ng-zorro-antd 13.3.2
Browser chrome

这个问题好像几个版本都存在...

@zorro-bot
Copy link

zorro-bot bot commented Jun 27, 2022

Translation of this issue:

DatePicker Date Selection Frame initialization Significance is still problematic

REPRODUCTION LINK

[https://angular-aev8a1.stackblitz.io] (https://angular-aev8a1.stackblitz.io)

STEPS To Reproduce

DatePicker Date Selection box initializes the assignment, and click the empty button on the right to clear. Sometimes it seems to be cleared after a few seconds, and sometimes the click is invalid;
Unless you click the panel to restart the value, it can be cleared in real time.
NZ-Range-Picker seems to be automatically emptied after 5-10 seconds after clicking
NZ-DATE-PICKER's pure click cannot be cleared

What is exfected?

DatePicker Date Selection Frame initializes in real time.

What is actually happy?

DatePicker Date Selection box initializes the assignment, and click the empty button on the right to clear.

| ENVIRONMENT | Info |
| --- | --- | |
| NG-Zorro-ATD | 13.3.2 |
| Browser | Chrome |


This problem seems to exist in several versions ...

@KevinZhang19870314
Copy link

我这边试下来的结果是,点击clear icon清除无效,然后鼠标点击input框之后清除,等5-10秒不会清除。

@luckyship
Copy link
Contributor

手动触发angular变更检测可以解决

import { ChangeDetectorRef } from '@angular/core';

constructor(private _cdr: ChangeDetectorRef)

onModelChange() {
  this._cdr.detectChanges();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants