diff --git a/components/datepicker/demo/dialog.md b/components/datepicker/demo/dialog.md new file mode 100644 index 0000000000..7a14b53695 --- /dev/null +++ b/components/datepicker/demo/dialog.md @@ -0,0 +1,45 @@ +# 结合弹出层 + +- order: 10 + +弹出层内的时间选择 + +--- + +````jsx +import { Modal, Button, Datepicker } from 'antd'; + +const App = React.createClass({ + getInitialState() { + return { visible: false }; + }, + showModal() { + this.setState({ + visible: true + }); + }, + handleOk() { + console.log('点击了确定'); + this.setState({ + visible: false + }); + }, + handleCancel() { + this.setState({ + visible: false + }); + }, + render() { + return
+ + + + +
; + } +}); + +ReactDOM.render( , document.getElementById('components-datepicker-demo-dialog')); +```` + diff --git a/style/components/datepicker/Picker.less b/style/components/datepicker/Picker.less index 8b36f150e1..f14248c970 100644 --- a/style/components/datepicker/Picker.less +++ b/style/components/datepicker/Picker.less @@ -1,9 +1,6 @@ .@{calendar-prefix-cls}-picker-container { position: absolute; - .@{calendar-prefix-cls} { - position: absolute; - z-index: 1070; - } + z-index: 1070; } .@{calendar-prefix-cls}-picker {