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

I get some errors when I used antd-Calendar Component #13753

Closed
1 task
Wanchaochao opened this issue Dec 21, 2018 · 2 comments
Closed
1 task

I get some errors when I used antd-Calendar Component #13753

Wanchaochao opened this issue Dec 21, 2018 · 2 comments
Assignees

Comments

@Wanchaochao
Copy link

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

Version

3.11.2

Environment

cli:umi(v2.1.2) browers:chrome react-native:7.11.1

Reproduction link

https://github.com/Wanchaochao/react-blog/blob/master/src/pages/layouts/index.js

Steps to reproduce

I create my project with umi-cli

and the error in the page

import { Calendar } from 'antd'

...
<Calendar
   fullscreen={false}
/>

I thought I lost the attribute value and defautValue for a moment object

After I got the errors I did this:

import moment from 'moment'
import 'moment/locale/zh-cn'

render(){
   const startTime = moment.momentToFormat
   ...
   value={startTime}
   defaultValue={startTime}
}

What is expected?

I dont`t want to see any error at chrome console.
I read the doc and I try to complete the attibute value and defautlValue,

What is actually happening?

but in the end, I got :
Warning: Failed value type: The value isRequired is marked as required in Select, but its value is undefined.
Warning: Failed defaultValue type: The defaultValue isRequired is marked as required in Select, but its value is undefined.'


I don`t how can I clear these errors, could you help me?

@afc163
Copy link
Member

afc163 commented Dec 21, 2018

Retry remove your node_modules yarn.lock package-lock.json and reinstall node_modules.

@afc163 afc163 closed this as completed Dec 21, 2018
@Wanchaochao
Copy link
Author

Thank you very much ~~
👏👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants