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添加验证报错 #3347

Closed
lslvxy opened this issue Oct 10, 2016 · 4 comments
Closed

DatePicker添加验证报错 #3347

lslvxy opened this issue Oct 10, 2016 · 4 comments
Assignees

Comments

@lslvxy
Copy link

lslvxy commented Oct 10, 2016

FotmItem中添加DatePicker的时候选择日期控制台会报错

date.js:28 Uncaught TypeError: value.getTime is not a function
示例代码请看
https://codepen.io/lslvxy/pen/bwozjp?editors=0011
查看时请打开F12开发者工具,控制台会抛出异常信息

示例中第一个没有验证不会抛出异常,第二个需要验证则报错

value取出来的是Moment对象

@afc163
Copy link
Member

afc163 commented Oct 10, 2016

#3294

https://ant.design/changelog#2.x-%E4%B8%8D%E5%85%BC%E5%AE%B9%E6%94%B9%E5%8A%A8

可以参照一下这里的写法:https://ant.design/components/form/#components-form-demo-validate-other


@benjycui 这块 changelog 文档还是要补上:时间类组件的 Form 写法发生了那些变化?代码怎么改

@dreamcatcher081210
Copy link

type: 'object',现在日期控件仅支持moment类型的了so....

@benjycui
Copy link
Contributor

这个 API 差异列不完的。。只能碰到一个就更新一个了。

@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants