Skip to content

Commit

Permalink
Merge pull request #17480 from ant-design/change-date-picker-arrow
Browse files Browse the repository at this point in the history
fix: 💄 change DatePicker arrow style
  • Loading branch information
afc163 committed Jul 5, 2019
2 parents a517a9e + 6498cbb commit 5375bf0
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 18 deletions.
81 changes: 65 additions & 16 deletions components/date-picker/style/Calendar.less
@@ -1,3 +1,64 @@
.calendarLeftArrow() {
height: 100%;

&::before,
&::after {
position: relative;
top: -1px;
display: inline-block;
width: 8px;
height: 8px;
vertical-align: middle;
border: 0 solid #aaa;
border-width: 1.5px 0 0 1.5px;
border-radius: 1px;
transform: rotate(-45deg) scale(.8);
transition: all .3s;
content: '';
}

&:hover::before,
&:hover::after {
border-color: @text-color;
}

&::after {
display: none;
}
}

.calendarLeftDoubleArrow() {
.calendarLeftArrow;

&::after {
position: relative;
left: -3px;
display: inline-block;
}
}

.calendarRightArrow() {
.calendarLeftArrow;

&::before,
&::after {
transform: rotate(135deg) scale(.8);
}
}

.calendarRightDoubleArrow() {
.calendarRightArrow;

&::before {
position: relative;
left: 3px;
}

&::after {
display: inline-block;
}
}

.calendarPanelHeader(@calendar-prefix-cls) {
height: 40px;
line-height: 40px;
Expand Down Expand Up @@ -49,36 +110,24 @@
.@{calendar-prefix-cls}-prev-decade-btn,
.@{calendar-prefix-cls}-prev-year-btn {
left: 7px;

&::after {
content: '«';
}
.calendarLeftDoubleArrow;
}

.@{calendar-prefix-cls}-next-century-btn,
.@{calendar-prefix-cls}-next-decade-btn,
.@{calendar-prefix-cls}-next-year-btn {
right: 7px;

&::after {
content: '»';
}
.calendarRightDoubleArrow;
}

.@{calendar-prefix-cls}-prev-month-btn {
left: 29px;

&::after {
content: '';
}
.calendarLeftArrow;
}

.@{calendar-prefix-cls}-next-month-btn {
right: 29px;

&::after {
content: '';
}
.calendarRightArrow;
}
}

Expand Down
3 changes: 1 addition & 2 deletions components/date-picker/style/RangePicker.less
Expand Up @@ -96,11 +96,10 @@
.@{calendar-prefix-cls}-input,
.@{calendar-timepicker-prefix-cls}-input {
.input;

height: @input-height-sm;
line-height: @input-height-sm;
padding-right: 0;
padding-left: 0;
line-height: @input-height-sm;
border: 0;
box-shadow: none;

Expand Down

0 comments on commit 5375bf0

Please sign in to comment.