mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
update datepicker demo
This commit is contained in:
parent
fce8ab5e64
commit
dffbda521c
@ -19,7 +19,8 @@ var App = React.createClass({
|
|||||||
lang: {
|
lang: {
|
||||||
today: 'Today',
|
today: 'Today',
|
||||||
now: 'Now',
|
now: 'Now',
|
||||||
ok: 'Ok'
|
ok: 'OK',
|
||||||
|
clear: 'Clear'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -38,7 +38,13 @@ function createPicker(TheCalendar) {
|
|||||||
calendarStyle: {},
|
calendarStyle: {},
|
||||||
onSelect: null, // 向前兼容
|
onSelect: null, // 向前兼容
|
||||||
onChange() {}, // onChange 可用于 Validator
|
onChange() {}, // onChange 可用于 Validator
|
||||||
locale: {}
|
locale: {},
|
||||||
|
placement: {
|
||||||
|
points: ['tl', 'tl'],
|
||||||
|
overflow: { adjustX: 0, adjustY: 0 },
|
||||||
|
offset: [0, -3],
|
||||||
|
targetOffset: [0, 0]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
@ -106,7 +112,7 @@ function createPicker(TheCalendar) {
|
|||||||
showTime={this.props.showTime}
|
showTime={this.props.showTime}
|
||||||
prefixCls="ant-calendar"
|
prefixCls="ant-calendar"
|
||||||
showOk={this.props.showTime}
|
showOk={this.props.showTime}
|
||||||
showClear={false} />
|
showClear={true} />
|
||||||
);
|
);
|
||||||
let sizeClass = '';
|
let sizeClass = '';
|
||||||
if (this.props.size === 'large') {
|
if (this.props.size === 'large') {
|
||||||
@ -124,6 +130,7 @@ function createPicker(TheCalendar) {
|
|||||||
defaultValue={defaultValue}
|
defaultValue={defaultValue}
|
||||||
prefixCls="ant-calendar-picker"
|
prefixCls="ant-calendar-picker"
|
||||||
style={this.props.style}
|
style={this.props.style}
|
||||||
|
placement={this.props.placement}
|
||||||
onChange={this.handleChange}>
|
onChange={this.handleChange}>
|
||||||
{
|
{
|
||||||
({value}) => {
|
({value}) => {
|
||||||
|
@ -230,15 +230,13 @@
|
|||||||
.@{calendar-prefix-cls}-clear-btn {
|
.@{calendar-prefix-cls}-clear-btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0 10px;
|
margin: 0 0 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.@{calendar-prefix-cls}-ok-btn {
|
.@{calendar-prefix-cls}-ok-btn {
|
||||||
.btn;
|
.btn;
|
||||||
.btn-primary;
|
.btn-primary;
|
||||||
.button-size(@btn-padding-sm; @font-size-base; @btn-border-radius-sm);
|
.button-size(@btn-padding-sm; @font-size-base; @btn-border-radius-sm);
|
||||||
letter-spacing: 3px;
|
|
||||||
text-indent: 3px;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 9px;
|
bottom: 9px;
|
||||||
right: 9px;
|
right: 9px;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
|
||||||
border-bottom: 1px solid #e9e9e9;
|
border-bottom: 1px solid #e9e9e9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user