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

WARN:The string type is not recommended for date-picker, use "Date" type #6310

Closed
itning opened this issue Jan 3, 2021 · 1 comment · Fixed by #6335
Closed

WARN:The string type is not recommended for date-picker, use "Date" type #6310

itning opened this issue Jan 3, 2021 · 1 comment · Fixed by #6335

Comments

@itning
Copy link

itning commented Jan 3, 2021

Reproduction link

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

Steps to reproduce

  1. 选择日期和时间
  2. 控制台出现警告:
    ng-zorro-antd-core-logger.js:26 [NG-ZORRO]: The string type is not recommended for date-picker, use "Date" type

What is expected?

希望是 null 或者 undefind的时候 不出现警告信息
即:

  • date1:Date;
  • date1:Date=undefind;
  • date1:Date=null;

What is actually happening?

出现警告信息

Environment Info
ng-zorro-antd 11.0.1
Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 t: 1609679376999
@itning
Copy link
Author

itning commented Jan 3, 2021

还有个问题就是
nzDefaultPickerValue 不起作用 设置了没用

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

Successfully merging a pull request may close this issue.

3 participants