Time picker

pull/4/head
afc163 10 years ago
parent 176f74d272
commit b0d5b31e11

@ -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'));
````

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

Loading…
Cancel
Save