mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
fix adjustOrientOnCalendarOverflow
This commit is contained in:
parent
fcb3297269
commit
0e58688dc2
@ -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"
|
||||
|
@ -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",
|
||||
|
@ -11,6 +11,10 @@
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&-input {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&-icon {
|
||||
position: absolute;
|
||||
-webkit-user-select: none;
|
||||
|
Loading…
Reference in New Issue
Block a user