Skip to content

Commit

Permalink
💄 optimize RangePicker active cell style
Browse files Browse the repository at this point in the history
close #17878
close #13567
close #16872
  • Loading branch information
afc163 committed Jul 30, 2019
1 parent b71f2ec commit da741ec
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 17 deletions.
38 changes: 21 additions & 17 deletions components/date-picker/style/Calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@
}
}

.calendar-selected-cell() {
.@{calendar-prefix-cls}-date {
color: @text-color-inverse;
background: @primary-color;
border: @border-width-base @border-style-base transparent;

&:hover {
background: @primary-color;
}
}
}

.@{calendar-prefix-cls} {
position: relative;
width: 280px;
Expand Down Expand Up @@ -255,27 +267,19 @@
border-color: @primary-color;
}

&-last-month-cell &-date,
&-next-month-btn-day &-date {
color: @disabled-color;
}

&-selected-day &-date {
background: tint(@primary-color, 80%);
background: @primary-2;
}

&-selected-date,
&-selected-start-date,
&-selected-end-date {
.@{calendar-prefix-cls}-date {
color: @text-color-inverse;
background: @primary-color;
border: @border-width-base @border-style-base transparent;
&-selected-date {
.calendar-selected-cell;
}

&:hover {
background: @primary-color;
}
}
&-last-month-cell &-date,
&-next-month-btn-day &-date {
color: @disabled-color !important;
background: transparent !important;;
border-color: transparent !important;;
}

&-disabled-cell &-date {
Expand Down
13 changes: 13 additions & 0 deletions components/date-picker/style/RangePicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@
transform: translateX(-50%);
}

.@{calendar-prefix-cls}-today {
.@{calendar-prefix-cls}-date {
color: @primary-color;
background: @primary-2;
border-color: @primary-color;
}
}

.@{calendar-prefix-cls}-selected-start-date,
.@{calendar-prefix-cls}-selected-end-date {
.calendar-selected-cell;
}

&.@{calendar-prefix-cls}-time &-right .@{calendar-prefix-cls}-date-input-wrap {
margin-left: 0;
}
Expand Down

0 comments on commit da741ec

Please sign in to comment.