diff --git a/components/datepicker/index.jsx b/components/datepicker/index.jsx index 228a38e4f1..9fda2e8f2f 100644 --- a/components/datepicker/index.jsx +++ b/components/datepicker/index.jsx @@ -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() { + } }; }, handleChange(v) { @@ -69,7 +70,10 @@ export default React.createClass({ disabled={this.props.disabled} trigger={} calendar={calendar} - adjustOrientOnCalendarOverflow={true} + adjustOrientOnCalendarOverflow={{ + x: true, + y: false + }} formatter={new DateTimeFormat(this.props.format)} value={this.state.value} prefixCls="ant-calendar-picker" diff --git a/package.json b/package.json index 19e31d9b6d..f912ded94e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/style/components/datepicker/Picker.less b/style/components/datepicker/Picker.less index 4d64aaa56e..21f971a8da 100644 --- a/style/components/datepicker/Picker.less +++ b/style/components/datepicker/Picker.less @@ -11,6 +11,10 @@ position: relative; display: inline-block; + &-input { + outline: none; + } + &-icon { position: absolute; -webkit-user-select: none;