mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
Time picker
This commit is contained in:
parent
176f74d272
commit
b0d5b31e11
15
components/datepicker/demo/time.md
Normal file
15
components/datepicker/demo/time.md
Normal 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'));
|
||||
````
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user