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

@ -10,7 +10,7 @@ import DateTimeFormat from 'gregorian-calendar-format';
//
import Locale from 'gregorian-calendar-format/lib/locale/zh-cn';
Locale.shortMonths = ['1月', '2月', '3月', '4月', '5月', '6月',
'7月', '8月', '9月', '10月', '11月', '12月'];
'7月', '8月', '9月', '10月', '11月', '12月'];
//
//
@ -42,7 +42,8 @@ export default React.createClass({
format: 'yyyy-MM-dd',
placeholder: '请选择日期',
transitionName: 'slide-up',
onSelect: function () {}
onSelect: function () {
}
};
},
handleChange(v) {
@ -69,7 +70,10 @@ export default React.createClass({
disabled={this.props.disabled}
trigger={<span className="ant-calendar-picker-icon" />}
calendar={calendar}
adjustOrientOnCalendarOverflow={true}
adjustOrientOnCalendarOverflow={{
x: true,
y: false
}}
formatter={new DateTimeFormat(this.props.format)}
value={this.state.value}
prefixCls="ant-calendar-picker"

View File

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

View File

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