mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 21:18:01 +08:00
452 B
452 B
选择日期
- order: 2
通过设置选择日期的回调事件 onSelect
,完成交互行为。
var Datepicker = antd.Datepicker;
var Picker = React.createClass({
handleChange: function(value) {
console.log(new Date(value.getTime()));
},
render: function() {
return <Datepicker onSelect={this.handleChange} />
}
});
React.render(
<Picker />
, document.getElementById('components-datepicker-demo-select'));