update started demo

This commit is contained in:
afc163 2015-08-26 16:38:55 +08:00
parent 38cbaf1239
commit 91048da7d7

View File

@ -78,17 +78,18 @@ var App = React.createClass({
};
},
handleChange(value) {
message.info('您选择的日期是: ' + value.toString());
this.setState({
date: value
});
},
notice() {
message.info(this.state.date.toString());
},
render() {
return <div>
return <div style={{width: 400, margin: '100px auto'}}>
<Datepicker onSelect={this.handleChange} />
<button className="ant-btn ant-btn-primary" onClick={this.notice}>显示日期</button>
<div style={{marginTop: 20}}>当前日期:{this.state.date.toString()}</div>
</div>;
}
});