NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.87k stars 3.93k forks source link

DatePicker日期选择框,输入框有值时,展开面板在关掉面板会触发ngModelChange #5908

Open 007GitHu opened 4 years ago

007GitHu commented 4 years ago

Reproduction link

https://stackblitz.com/edit/angular-zjuj98-udhwaz?file=src/app/app.component.ts

Steps to reproduce

1、点击日期组件,弹框操作面板后,直接点击空白区域,关闭操作面板,此时会触发ngModelChange,而输入框中的值并未改变

What is expected?

日期选择框有默认值时,输入框的值改变,才触发ngModelChange

What is actually happening?

日期选择框有默认值时,输入框的值未发生改变,只是操作面板展开或收起就会触发ngModelChange

Environment Info
ng-zorro-antd 9.3.0
Browser 谷歌
zorro-bot[bot] commented 4 years ago

Translation of this issue:

DatePicker date selection box, input box has value, expand the panel to turn off the panel will trigger ngModelChange

Reproduction link

[Https://stackblitz.com/edit/angular-zjuj98-udhwaz?file=src/app/app.component.ts](https://stackblitz.com/edit/angular-zjuj98-udhwaz?file=src/ app / app.component.ts)

Steps to reproduce

1, click the date components, the operation panel popping box, click on a blank area, the closing operation panel, this time will trigger ngModelChange, but does not change the value of the input box

What is expected?

When the date selection box has a default value, change the value of the input box, only to trigger ngModelChange

What is actually happening?

When the date selection box has a default value, the value of the input box has not changed, but the operator panel to expand or collapse triggered ngModelChange

Environment Info
Ng-zorro-antd 9.3.0
Browser Google