{"action":"closed","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/1552","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/1552/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/1552/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/1552/events","html_url":"https://github.com/ant-design/ant-design/issues/1552","id":151795095,"number":1552,"title":"Picker is changing a uncontrolled input of type undefined to be controlled","user":{"login":"kairi1227","id":4525647,"avatar_url":"https://avatars.githubusercontent.com/u/4525647?v=3","gravatar_id":"","url":"https://api.github.com/users/kairi1227","html_url":"https://github.com/kairi1227","followers_url":"https://api.github.com/users/kairi1227/followers","following_url":"https://api.github.com/users/kairi1227/following{/other_user}","gists_url":"https://api.github.com/users/kairi1227/gists{/gist_id}","starred_url":"https://api.github.com/users/kairi1227/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kairi1227/subscriptions","organizations_url":"https://api.github.com/users/kairi1227/orgs","repos_url":"https://api.github.com/users/kairi1227/repos","events_url":"https://api.github.com/users/kairi1227/events{/privacy}","received_events_url":"https://api.github.com/users/kairi1227/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-29T05:21:32Z","updated_at":"2016-04-29T05:28:34Z","closed_at":"2016-04-29T05:28:34Z","body":"使用RangePicker（\"antd\": \"^0.12.15\",）组件出的问题，选择完时间单击确定的时候。\r\n\r\nwarning.js?7fcb:44 Warning: Picker is changing a uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components\r\n\r\n\r\nDemo如下\r\n```\r\nrequire('antd/style/index.less');\r\n\r\nimport React from 'react';\r\nimport ReactDOM from 'react/lib/ReactDOM';\r\n\r\n\r\nimport {DatePicker} from 'antd';\r\nconst RangePicker = DatePicker.RangePicker;\r\n\r\nclass Demo extends React.Component {\r\n    constructor(props) {\r\n        super(props);\r\n\r\n    }\r\n    render() {\r\n        return (\r\n            <div>\r\n                <RangePicker showTime format=\"yyyy-MM-dd hh:mm a\"/>\r\n            </div>\r\n        )\r\n    }\r\n}\r\n\r\nReactDOM.render(<Demo />, document.getElementById('test'));\r\n```"}}