diff --git a/components/datepicker/demo/locale.md b/components/datepicker/demo/locale.md index 92c1be40f3..71f611ea6a 100644 --- a/components/datepicker/demo/locale.md +++ b/components/datepicker/demo/locale.md @@ -19,7 +19,8 @@ var App = React.createClass({ lang: { today: 'Today', now: 'Now', - ok: 'Ok' + ok: 'OK', + clear: 'Clear' } } }; diff --git a/components/datepicker/index.jsx b/components/datepicker/index.jsx index 8fdf798d1f..a4d44ecaa6 100644 --- a/components/datepicker/index.jsx +++ b/components/datepicker/index.jsx @@ -38,7 +38,13 @@ function createPicker(TheCalendar) { calendarStyle: {}, onSelect: null, // 向前兼容 onChange() {}, // onChange 可用于 Validator - locale: {} + locale: {}, + placement: { + points: ['tl', 'tl'], + overflow: { adjustX: 0, adjustY: 0 }, + offset: [0, -3], + targetOffset: [0, 0] + } }; }, getInitialState() { @@ -106,7 +112,7 @@ function createPicker(TheCalendar) { showTime={this.props.showTime} prefixCls="ant-calendar" showOk={this.props.showTime} - showClear={false} /> + showClear={true} /> ); let sizeClass = ''; if (this.props.size === 'large') { @@ -124,6 +130,7 @@ function createPicker(TheCalendar) { defaultValue={defaultValue} prefixCls="ant-calendar-picker" style={this.props.style} + placement={this.props.placement} onChange={this.handleChange}> { ({value}) => { diff --git a/style/components/datepicker/Calendar.less b/style/components/datepicker/Calendar.less index 738b796126..5043b62603 100644 --- a/style/components/datepicker/Calendar.less +++ b/style/components/datepicker/Calendar.less @@ -230,15 +230,13 @@ .@{calendar-prefix-cls}-clear-btn { display: inline-block; text-align: center; - margin: 0 10px; + margin: 0 0 0 8px; } .@{calendar-prefix-cls}-ok-btn { .btn; .btn-primary; .button-size(@btn-padding-sm; @font-size-base; @btn-border-radius-sm); - letter-spacing: 3px; - text-indent: 3px; position: absolute; bottom: 9px; right: 9px; diff --git a/style/components/datepicker/TimePanel.less b/style/components/datepicker/TimePanel.less index b9e638ae3c..f57f418ce8 100644 --- a/style/components/datepicker/TimePanel.less +++ b/style/components/datepicker/TimePanel.less @@ -18,7 +18,6 @@ position: relative; text-align: center; user-select: none; - -webkit-user-select: none; border-bottom: 1px solid #e9e9e9; }