fix adjustOrientOnCalendarOverflow

This commit is contained in:
yiminghe 2015-08-04 18:42:41 +08:00
parent fcb3297269
commit 0e58688dc2
3 changed files with 13 additions and 5 deletions

View File

@ -42,7 +42,8 @@ export default React.createClass({
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
placeholder: '请选择日期', placeholder: '请选择日期',
transitionName: 'slide-up', transitionName: 'slide-up',
onSelect: function () {} onSelect: function () {
}
}; };
}, },
handleChange(v) { handleChange(v) {
@ -69,7 +70,10 @@ export default React.createClass({
disabled={this.props.disabled} disabled={this.props.disabled}
trigger={<span className="ant-calendar-picker-icon" />} trigger={<span className="ant-calendar-picker-icon" />}
calendar={calendar} calendar={calendar}
adjustOrientOnCalendarOverflow={true} adjustOrientOnCalendarOverflow={{
x: true,
y: false
}}
formatter={new DateTimeFormat(this.props.format)} formatter={new DateTimeFormat(this.props.format)}
value={this.state.value} value={this.state.value}
prefixCls="ant-calendar-picker" prefixCls="ant-calendar-picker"

View File

@ -36,8 +36,8 @@
"gregorian-calendar": "~3.0.0", "gregorian-calendar": "~3.0.0",
"gregorian-calendar-format": "~3.0.1", "gregorian-calendar-format": "~3.0.1",
"is-equal-shallow": "~0.1.3", "is-equal-shallow": "~0.1.3",
"object-assign": "~3.0.0", "object-assign": "3.x",
"rc-calendar": "~3.11.0", "rc-calendar": "~3.12.3",
"rc-checkbox": "~1.0.6", "rc-checkbox": "~1.0.6",
"rc-collapse": "~1.2.3", "rc-collapse": "~1.2.3",
"rc-dialog": "~4.4.0", "rc-dialog": "~4.4.0",

View File

@ -11,6 +11,10 @@
position: relative; position: relative;
display: inline-block; display: inline-block;
&-input {
outline: none;
}
&-icon { &-icon {
position: absolute; position: absolute;
-webkit-user-select: none; -webkit-user-select: none;