mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
fix range picker
This commit is contained in:
parent
c8bb01c76d
commit
a5efd5d028
@ -38,8 +38,9 @@ export default React.createClass({
|
||||
mixins: [ PickerMixin ],
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if ('value' in nextProps) {
|
||||
const start = this.parseDateFromValue(nextProps.value[0]);
|
||||
const end = this.parseDateFromValue(nextProps.value[1]);
|
||||
const value = nextProps.value || [];
|
||||
const start = this.parseDateFromValue(value[0]);
|
||||
const end = this.parseDateFromValue(value[1]);
|
||||
this.setState({
|
||||
value: [start, end]
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user