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日期选择框的nz-range-picker输入的开始时间大于结束时间时,界面input的框显示的是输入的值,而modle里面是之前选中的值 #3940

Closed
007GitHu opened this issue Aug 6, 2019 · 1 comment · Fixed by #3956

Comments

@007GitHu
Copy link

007GitHu commented Aug 6, 2019

Reproduction link

https://ng-zorro-antd-start.stackblitz.io

Steps to reproduce

手动录入开始时间大于结束时间,控制台输出modle值,可以看到问题

What is expected?

提供不可输入的属性、或者判断当输入的开始时间大于结束时间时,输入框里面的值还原为之前选中的值

What is actually happening?

当界面输入正确的时间格式,但是开始时间大于结束时间的时候,界面显示的是刚输入的值,也就是开始时间大于了结束时间,而modle里面是刚刚展开面板选择的值,而不是输入的值

Environment Info
ng-zorro-antd 7.5.1
Browser 版本 74.0.3729.131(正式版本) (32 位)
@zorro-bot
Copy link

zorro-bot bot commented Aug 6, 2019

Translation of this issue:

When the start time of the nz-range-picker input of the DatePicker date selection box is greater than the end time, the input box of the interface displays the input value, and the default value is the inside of the modle.

Reproduction link

https://ng-zorro-antd-start.stackblitz.io

Steps to reproduce

Manual entry start time is greater than the end time, the console outputs the modle value, you can see the problem

What is expected?

Provides an attribute that cannot be input, or judges that when the input start time is greater than the end time, the value in the input box is restored to the previously selected value.

What is actually happening?

When the interface enters the correct time format, but the start time is greater than the end time, the interface displays the value just entered, that is, the start time is greater than the end time, and the modle is the value just selected for the panel expansion, instead of the input. value

Environment Info
ng-zorro-antd 7.5.1
Browser Version 74.0.3729.131 (official version) (32 bit)

vthinkxie pushed a commit that referenced this issue Aug 13, 2019
…end (#3956)

* fix(module:date-picker): sort range picker value when start is after end

* fix: test

close #3940, close #1642
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
…end (NG-ZORRO#3956)

* fix(module:date-picker): sort range picker value when start is after end

* fix: test

close NG-ZORRO#3940, close NG-ZORRO#1642
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
…end (NG-ZORRO#3956)

* fix(module:date-picker): sort range picker value when start is after end

* fix: test

close NG-ZORRO#3940, close NG-ZORRO#1642
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.

2 participants