Time picker

This commit is contained in:
afc163 2015-05-29 21:07:46 +08:00
parent 176f74d272
commit b0d5b31e11
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,15 @@
# 时间选择
- order: 4
- description: 准确到秒的时间选择面板。
---
````jsx
var Datepicker = antd.datepicker;
React.render(
<Datepicker showTime={true} format="yyyy/MM/dd HH:mm:ss" />
, document.getElementById('components-datepicker-demo-time'));
````

View File

@ -35,12 +35,14 @@ module.exports = React.createClass({
this.props.onSelect(new Date(this.state.value.getTime()));
},
render: function () {
console.log(this.props.showTime);
var calendar = (
<Calendar
disabledDate={this.state.disabled}
locale={CalendarLocale}
orient={['top', 'left']}
showClear={true} />
showTime={this.props.showTime}
showClear={false} />
);
return (
<DatePicker