Compare commits

...

3 Commits
3.5.2 ... 2.2.1

Author SHA1 Message Date
afc163
bd8016f236 changelog for 2.2.1 2016-11-02 13:38:37 +08:00
afc163
137de1aebf Fix controlled DatePicker[showTime] not working, close #3665 2016-11-02 13:34:52 +08:00
Benjy Cui
463b9800a4 fix: should check undefined value, close: #3665 2016-11-02 13:34:42 +08:00
4 changed files with 17 additions and 6 deletions

View File

@@ -9,6 +9,12 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi
---
## 2.2.1
`2016-11-02`
* Fix controlled DatePicker[showTime] not working bug. [#3665](https://github.com/ant-design/ant-design/issues/3665)
## 2.2.0
`2016-10-28`

View File

@@ -9,6 +9,12 @@ timeline: true
---
## 2.2.1
`2016-11-02`
* 修复 Form 中 DatePicker[showTime](受控)无法使用的问题。[#3665](https://github.com/ant-design/ant-design/issues/3665)
## 2.2.0
`2016-10-28`

View File

@@ -31,9 +31,10 @@ export default function createPicker(TheCalendar) {
},
componentWillReceiveProps(nextProps: PickerProps) {
if ('value' in nextProps) {
if (nextProps.value !== undefined) {
this.setState({
value: nextProps.value,
tempValue: nextProps.value,
});
}
},
@@ -47,16 +48,14 @@ export default function createPicker(TheCalendar) {
handleChange(value) {
const props = this.props;
if (!('value' in props)) {
if (props.value === undefined) {
this.setState({ value });
}
props.onChange(value, (value && value.format(props.format)) || '');
},
handleTempChange(tempValue) {
if (!('value' in this.props)) {
this.setState({ tempValue });
}
this.setState({ tempValue });
},
// Clear temp value when hide picker panel

View File

@@ -1,6 +1,6 @@
{
"name": "antd",
"version": "2.2.0",
"version": "2.2.1",
"title": "Ant Design",
"description": "An enterprise-class UI design language and React-based implementation",
"homepage": "http://ant.design/",