mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd8016f236 | ||
|
|
137de1aebf | ||
|
|
463b9800a4 |
@@ -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`
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/",
|
||||
|
||||
Reference in New Issue
Block a user