ng-zorro-antd icon indicating copy to clipboard operation
ng-zorro-antd copied to clipboard

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

Open 232650413 opened this issue 2 years ago • 3 comments

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

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

232650413 avatar Jun 27 '22 02:06 232650413

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 ...

zorro-bot[bot] avatar Jun 27 '22 02:06 zorro-bot[bot]

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

KevinZhang19870314 avatar Jun 30 '22 07:06 KevinZhang19870314

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

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

constructor(private _cdr: ChangeDetectorRef)

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

luckyship avatar Aug 31 '22 08:08 luckyship