Browse Source

update RangePicker style

pull/700/head
afc163 9 years ago
parent
commit
82bb807932
  1. 2
      components/date-picker/RangePicker.jsx
  2. 20
      style/components/datepicker/RangePicker.less
  3. 19
      style/components/datepicker/TimePicker.less

2
components/date-picker/RangePicker.jsx

@ -118,7 +118,7 @@ export default React.createClass({
value={start && this.getFormatter().format(start)} value={start && this.getFormatter().format(start)}
placeholder={startPlaceholder} placeholder={startPlaceholder}
className="ant-calendar-range-picker-input" /> className="ant-calendar-range-picker-input" />
<span> ~ </span> <span className="ant-calendar-range-picker-separator"> ~ </span>
<input disabled={disabled} <input disabled={disabled}
onChange={this.handleInputChange} onChange={this.handleInputChange}
value={end && this.getFormatter().format(end)} value={end && this.getFormatter().format(end)}

20
style/components/datepicker/RangePicker.less

@ -11,18 +11,23 @@
line-height: 18px; line-height: 18px;
outline: 0; outline: 0;
width: 43%; width: 43%;
text-align: center;
&[disabled] { &[disabled] {
cursor: not-allowed; cursor: not-allowed;
} }
} }
.@{calendar-prefix-cls}-range-picker-separator {
color: #999;
}
.@{calendar-prefix-cls}-range { .@{calendar-prefix-cls}-range {
width: 470px; width: 470px;
overflow: hidden; overflow: hidden;
&-part { &-part {
width: 231px; width: 50%;
position: relative; position: relative;
} }
@ -38,26 +43,23 @@
position: absolute; position: absolute;
left: 50%; left: 50%;
width: 20px; width: 20px;
margin-left: -147px; margin-left: -132px;
text-align: center; text-align: center;
height: @input-box-height; height: @input-box-height;
line-height: @input-box-height; line-height: @input-box-height;
color: #999;
} }
&-right .@{calendar-prefix-cls}-date-input-wrap { &-right .@{calendar-prefix-cls}-date-input-wrap {
margin-left: -133px; margin-left: -118px;
} }
&.@{calendar-prefix-cls}-time &-middle { &.@{calendar-prefix-cls}-time &-middle {
margin-left: -45px; margin-left: -29px;
} }
&.@{calendar-prefix-cls}-time &-right .@{calendar-prefix-cls}-date-input-wrap { &.@{calendar-prefix-cls}-time &-right .@{calendar-prefix-cls}-date-input-wrap {
margin-left: -30px; margin-left: -15px;
}
&.@{calendar-prefix-cls}-time &-right .@{calendar-prefix-cls}-time-picker-wrap {
left: 78px;
} }
.@{calendar-prefix-cls}-input-wrap { .@{calendar-prefix-cls}-input-wrap {

19
style/components/datepicker/TimePicker.less

@ -1,18 +1,27 @@
@import "../../mixins/input"; @import "../../mixins/input";
.@{calendar-prefix-cls}-time { .@{calendar-prefix-cls}-time {
// Change display order in DOM
.@{calendar-prefix-cls}-input-wrap {
direction: rtl;
.@{calendar-prefix-cls}-date-input-wrap,
.@{calendar-prefix-cls}-time-picker-wrap {
direction: ltr;
display: inline-block;
}
.@{timepicker-prefix-cls}-panel,
.@{calendar-prefix-cls}-clear-btn {
direction: ltr;
}
}
.@{calendar-prefix-cls}-input, .@{calendar-prefix-cls}-input,
.@{timepicker-prefix-cls}-input { .@{timepicker-prefix-cls}-input {
.input; .input;
height: 22px; height: 22px;
width: 96px; width: 96px;
margin-right: 6px;
} }
.@{timepicker-prefix-cls}-icon { .@{timepicker-prefix-cls}-icon {
display: none; display: none;
} }
&-picker-wrap {
position: absolute;
left: 106px;
top: 6px;
}
} }

Loading…
Cancel
Save