pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

Form 组件 onFinish 的 values 参数 和 form.getFieldsValue() 结果不一致

Open Yrobot opened this issue 8 months ago • 5 comments
trafficstars

Reproduction link

Edit on StackBlitz

https://codesandbox.io/p/sandbox/proform-date-bug-m6jjyp

Steps to reproduce

  1. fill in the form fields
  2. submit
  3. check the data log inside the console: the contractTime is not available in the Form.onFinish.values

What is expected?

values.contractTime supposed to be Date[], same as the form.getFieldsValue().contractTime result.

What is actually happening?

values.contractTime is empty object array. form.getFieldsValue().contractTime is Date array.

Image
Environment Info
antd 5.24.3
React 19.0.0
System macos
Browser chrome

Yrobot avatar Mar 12 '25 09:03 Yrobot