-
-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Antd 4.0.0 <DatePicker /> uses setFieldsValue update error in <Form /> #20206
Comments
##我也遇到了同样的问题,请问解决了吗? Error:
|
birthday 给 moment实例 |
https://codepen.io/ergomesh/pen/ZEywWyW?editors=0110 Same here can not get any initialValues to load correctly and it breaks the whole page I have tried moment date and string representations. This particular example is in a form.list but it also happens outside of it. |
anyone get solve about this issue ? I get same issue error |
If you cast your Date object into moment object first, this error disappears. |
@ppulwey please provide and example |
今天我也出现了这个报错,然后发现,在set之前,用dayjs库给入参(元数据)的日期时间字符串包裹一下生成dayjs的日期对象就没有那个报错了,just like this: value: dayjs(eventInfo.date) |
Reproduction link
Steps to reproduce
more code: https://codesandbox.io/s/antd-400-datepicker-uses-setfieldsvalue-update-error-in-form-efrp9
What is expected?
setFieldsValue can correctly verify moment() or Date.
What is actually happening?
setFieldsValue check for moment() or Date error. but setFields succeeds. why?
The text was updated successfully, but these errors were encountered: