Skip to content

The value received by the onChange () event is different from the value displayed by <RangePicker/> #21900

@Lam9090

Description

@Lam9090
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Select any start time A (e.g. 2020/3/5 16:58:00)
  2. Select the the end time B (e.g. 2020/3/5 01:00:00) which has same day as the start time, but less than the start time.
    3.<RangePicker/> will automatically exchange the start time and end time, and the displayed time is [A, B].
  3. The value received by the onChange event is wrong value [B, A]

重现步骤

  1. 选择任一开始时间 A (例如:2020/3/5 16:58:00)
  2. 选择和开始时间在同一天,但是小于开始时间的 结束时间 B(例如:2020/3/5 01:00:00) .
  3. <RangePicker/>会自动交换开始时间和结束时间,显示的时间是[A,B].
  4. onChange 事件接受到的值是错误的[B,A]

What is expected?

  • The value received by the onChange () event is same as the value displayed by <RangePicker />

  • onChange()事件接受的值和显示的一样

What is actually happening?

  • The value received by the onChange () event is different from the value displayed by <RangePicker />

  • <RangePicker/> 自动交换开始时间和结束时间后,onChange()事件接受的值和<RangePicker/>显示的不一样

Environment Info
antd 4.0.1
React 16.13.0
System windows
Browser Chrome@latest

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions