@gem-mine/rmc-calendar
Version:
React Mobile Calendar Component(web and react-native)
433 lines (432 loc) • 9.26 kB
CSS
.rmc-calendar {
font-family: Arial, "Hiragino Sans GB", "Microsoft Yahei", "Microsoft Sans Serif", "WenQuanYi Micro Hei", sans-serif;
}
.rmc-calendar-hidden {
display: none;
}
.rmc-calendar .animate {
animation-duration: .3s;
animation-fill-mode: both;
}
@keyframes fadeIn {
0% {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
}
to {
opacity: 0;
}
}
.rmc-calendar .fade-enter {
animation-name: fadeIn;
}
.rmc-calendar .fade-leave {
animation-name: fadeOut;
}
@keyframes slideInUp {
0% {
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
transform: translateZ(0);
}
}
@keyframes slideInDown {
0% {
transform: translateZ(0);
visibility: visible;
}
to {
transform: translate3d(0, 100%, 0);
}
}
.rmc-calendar .slideV-enter {
animation-name: slideInUp;
}
.rmc-calendar .slideV-leave {
animation-name: slideInDown;
}
.rmc-calendar .mask {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 999;
background: rgba(0, 0, 0, 0.5);
}
.rmc-calendar .content,
.rmc-calendar .picker {
position: fixed;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 100%;
left: 0;
z-index: 999;
}
.rmc-calendar .content {
height: 75%;
top: 25%;
background: #fff;
}
.rmc-calendar .calendar-swiper {
height: auto;
top: auto;
bottom: 0;
}
.rmc-calendar .picker {
height: 70%;
bottom: 0;
}
.rmc-calendar .header {
margin: 8px;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: justify;
justify-content: space-between;
-ms-flex-negative: 0;
flex-shrink: 0;
-ms-flex-align: center;
align-items: center;
color: #068EEF;
}
.rmc-calendar .header .come-today {
width: 40px;
}
.rmc-calendar .header .title {
text-align: center;
font-size: 16px;
}
.rmc-calendar .header .left {
display: -ms-flexbox;
display: flex;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
width: 40px;
height: 24px;
font-size: 14px;
}
.rmc-calendar .timePicker {
border-top: 1PX #ccc solid;
}
.rmc-calendar .week-panel {
background: #f7f7f7;
display: -ms-flexbox;
display: flex;
-ms-flex-negative: 0;
flex-shrink: 0;
padding: 0 2px;
}
.rmc-calendar .week-panel .cell {
height: 24px;
display: -ms-flexbox;
display: flex;
width: 14.28571429%;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
color: #000;
font-size: 14px;
}
.rmc-calendar .week-panel .cell-grey {
color: #bbb;
}
.rmc-calendar .calendar-panel {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
background: #eee;
padding-bottom: env(safe-area-inset-bottom);
-ms-flex: 1;
flex: 1;
min-height: 0;
}
.rmc-calendar .calendar-panel .wrapper {
height: auto;
position: relative;
-ms-flex: 1;
flex: 1;
min-height: 0;
-webkit-overflow-scrolling: touch;
}
.rmc-calendar .calendar-panel .months {
background: #fff;
}
.rmc-calendar .calendar-panel .load-tip {
position: absolute;
display: -ms-flexbox;
display: flex;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: end;
align-items: flex-end;
left: 0;
right: 0;
padding: 10px 0;
top: -40px;
color: #bbb;
}
.rmc-calendar .confirm-panel {
display: -ms-flexbox;
display: flex;
-ms-flex-negative: 0;
flex-shrink: 0;
-ms-flex-align: center;
align-items: center;
background: #fff;
border-top: #ddd 1PX solid;
}
.rmc-calendar .confirm-panel .info {
margin-right: auto;
font-size: 12px;
margin: 8px auto 8px 15px;
}
.rmc-calendar .confirm-panel .info p {
margin: 0;
}
.rmc-calendar .confirm-panel .info p + p {
margin-top: 8px;
}
.rmc-calendar .confirm-panel .info .grey {
color: #bbb;
}
.rmc-calendar .confirm-panel .button {
text-align: center;
width: 70px;
height: 46px;
line-height: 46px;
padding: 5px 0;
font-size: 18px;
}
.rmc-calendar .confirm-panel .button + .button {
border-left: #ddd 1PX solid;
}
.rmc-calendar .confirm-panel .button-disable {
color: #bbb;
}
.rmc-calendar .confirm-panel .confirm {
color: #108ee9;
}
.rmc-calendar .confirm-panel .button-full {
height: 30px;
line-height: 30px;
width: 100%;
text-align: center;
}
.rmc-calendar .time-picker {
position: fixed;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-negative: 0;
flex-shrink: 0;
width: 100%;
bottom: 0;
left: 0;
z-index: 999;
background: #fff;
}
.rmc-calendar .time-picker .header {
display: -ms-flexbox;
display: flex;
margin: 0;
-ms-flex-pack: justify;
justify-content: space-between;
-ms-flex-align: center;
align-items: center;
height: 44px;
color: #000;
font-size: 16px;
border-top: 1PX #ddd solid;
border-bottom: 1PX #ddd solid;
}
.rmc-calendar .time-picker .header .title {
-ms-flex: 1;
flex: 1;
width: auto;
text-align: left;
margin-left: 10px;
}
.rmc-calendar .time-picker .header .time-show {
display: -ms-flexbox;
display: flex;
font-size: 14px;
margin-right: 10px;
height: 20px;
width: 70px;
-ms-flex-pack: justify;
justify-content: space-between;
-ms-flex-align: center;
align-items: center;
}
.rmc-calendar .time-picker .header .time-show .time-picker-scrolling {
font-size: 20px;
}
.rmc-calendar .time-picker .rmc-picker-item {
color: #000;
}
.rmc-calendar .time-picker .rmc-picker-indicator {
background-color: #f7f7f7;
z-index: 0;
}
.rmc-calendar .single-month {
padding: 0;
}
.rmc-calendar .single-month .date-panel {
position: relative;
}
.rmc-calendar .single-month .date-panel .monthBgNumber {
position: absolute;
color: rgba(16, 142, 233, 0.3);
}
.rmc-calendar .single-month .date-panel::before {
content: attr(data-title);
display: block;
position: absolute;
line-height: 12px;
color: rgba(16, 142, 233, 0.05);
font-weight: bold;
zoom: 20;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
}
.rmc-calendar .single-month .month-title {
position: relative;
margin: 0;
text-align: center;
font-size: 17px;
color: #bbb;
}
.rmc-calendar .single-month .month-title .title-space {
padding: 5px;
background: #fff;
}
.rmc-calendar .single-month .month-title .title-space::before,
.rmc-calendar .single-month .month-title .title-space::after {
content: '';
position: absolute;
width: 40%;
height: 1px;
top: 50%;
background: #ddd;
}
.rmc-calendar .single-month .month-title .title-space::before {
left: 0;
}
.rmc-calendar .single-month .month-title .title-space::after {
right: 0;
}
.rmc-calendar .single-month .row {
display: -ms-flexbox;
display: flex;
-ms-flex-align: baseline;
align-items: baseline;
}
.rmc-calendar .single-month .row .cell {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 14.28571429%;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
}
.rmc-calendar .single-month .row .cell .date-wrapper {
display: -ms-flexbox;
display: flex;
height: 32px;
width: 100%;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
}
.rmc-calendar .single-month .row .cell .date-wrapper .date {
display: -ms-flexbox;
display: flex;
-ms-flex-pack: center;
justify-content: center;
-ms-flex-align: center;
align-items: center;
width: 32px;
height: 32px;
-ms-flex-negative: 0;
flex-shrink: 0;
color: #000;
font-size: 17px;
}
.rmc-calendar .single-month .row .cell .date-wrapper .disable {
color: #bbb;
background: #eee;
border: none;
border-radius: 100%;
}
.rmc-calendar .single-month .row .cell .date-wrapper .today {
color: #108ee9;
border: 1PX #108ee9 solid;
border-radius: 100%;
}
.rmc-calendar .single-month .row .cell .date-wrapper .left,
.rmc-calendar .single-month .row .cell .date-wrapper .right {
border: none;
width: 100%;
height: 32px;
}
.rmc-calendar .single-month .row .cell .date-wrapper .date-selected {
border: none;
background: #108ee9;
color: #fff;
font-size: 17px;
}
.rmc-calendar .single-month .row .cell .date-wrapper .selected-start {
border-radius: 100% 0 0 100%;
}
.rmc-calendar .single-month .row .cell .date-wrapper .selected-single {
border-radius: 100%;
}
.rmc-calendar .single-month .row .cell .date-wrapper .selected-middle {
border-radius: 0;
}
.rmc-calendar .single-month .row .cell .date-wrapper .selected-end {
border-radius: 0 100% 100% 0;
}
.rmc-calendar .single-month .row .cell .info,
.rmc-calendar .single-month .row .cell .superscrip {
width: 100%;
font-size: 10px;
color: #888;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-align: center;
}
.rmc-calendar .single-month .row .cell .info {
height: 14px;
padding: 0 5px;
}
.rmc-calendar .single-month .row .cell .superscrip {
text-align: left;
padding-left: 5px;
}
.rmc-calendar .single-month .row .cell .date-selected {
color: #108ee9;
}