cusotm-react-calendar
Version:
React Mobile Calendar Component(web and react-native)
388 lines (387 loc) • 7.7 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 {
-webkit-animation-duration: 0.3s;
animation-duration: 0.3s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes fadeIn {
0% {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeIn {
0% {
opacity: 0;
}
to {
opacity: 1;
}
}
@-webkit-keyframes fadeOut {
0% {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
}
to {
opacity: 0;
}
}
.rmc-calendar .fade-enter {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
.rmc-calendar .fade-leave {
-webkit-animation-name: fadeOut;
animation-name: fadeOut;
}
@-webkit-keyframes slideInUp {
0% {
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
transform: translateZ(0);
}
}
@keyframes slideInUp {
0% {
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
transform: translateZ(0);
}
}
@-webkit-keyframes slideInDown {
0% {
transform: translateZ(0);
visibility: visible;
}
to {
transform: translate3d(0, 100%, 0);
}
}
@keyframes slideInDown {
0% {
transform: translateZ(0);
visibility: visible;
}
to {
transform: translate3d(0, 100%, 0);
}
}
@-webkit-keyframes slideInLeft {
0% {
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
transform: translateZ(0);
}
}
@keyframes slideInLeft {
0% {
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
transform: translateZ(0);
}
}
@-webkit-keyframes slideInRight {
0% {
transform: translateZ(0);
visibility: visible;
}
to {
transform: translate3d(100%, 0, 0);
}
}
@keyframes slideInRight {
0% {
transform: translateZ(0);
visibility: visible;
}
to {
transform: translate3d(100%, 0, 0);
}
}
.rmc-calendar .slideV-enter {
-webkit-animation-name: slideInUp;
animation-name: slideInUp;
}
.rmc-calendar .slideV-leave {
-webkit-animation-name: slideInDown;
animation-name: slideInDown;
}
.rmc-calendar .slideH-enter {
-webkit-animation-name: slideInLeft;
animation-name: slideInLeft;
}
.rmc-calendar .slideH-leave {
-webkit-animation-name: slideInRight;
animation-name: slideInRight;
}
.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 {
position: fixed;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 999;
background: #fff;
}
.rmc-calendar .header {
margin: 5px;
display: flex;
flex-shrink: 0;
align-items: center;
}
.rmc-calendar .header .title {
text-align: center;
width: 100%;
font-weight: 700;
}
.rmc-calendar .header .left {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
padding: 0 8px;
height: 24px;
left: 5px;
top: 5px;
color: #068EEF;
}
.rmc-calendar .header .right {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
padding: 0 8px;
height: 24px;
right: 5px;
top: 5px;
color: #068EEF;
font-size: 14px;
}
.rmc-calendar .timePicker {
border-top: 1px #ccc solid;
}
.rmc-calendar .week-panel {
background: #fff;
display: flex;
flex-shrink: 0;
padding: 0 2px;
border-bottom: 1px #ccc solid;
}
.rmc-calendar .week-panel .cell {
height: 24px;
display: flex;
width: 14.28571429%;
justify-content: center;
align-items: center;
}
.rmc-calendar .week-panel .cell-grey {
color: #999;
}
.rmc-calendar .date-picker {
display: flex;
flex-direction: column;
background: #eee;
}
.rmc-calendar .date-picker .wrapper {
height: auto;
position: relative;
}
.rmc-calendar .date-picker .months {
background: #fff;
}
.rmc-calendar .date-picker .load-tip {
position: absolute;
display: flex;
justify-content: center;
align-items: flex-end;
left: 0;
right: 0;
padding: 10px 0;
top: -40px;
color: #bbb;
}
.rmc-calendar .confirm-panel {
display: flex;
flex-shrink: 0;
justify-content: center;
align-items: center;
background: #eee;
padding: 2px 10px;
border-top: #E5E4E4 1px solid;
}
.rmc-calendar .confirm-panel .info {
font-size: 12px;
}
.rmc-calendar .confirm-panel .info p {
margin: 0;
}
.rmc-calendar .confirm-panel .info .grey {
color: #999;
}
.rmc-calendar .confirm-panel .button {
padding: 5px 20px;
border-radius: 5px;
align-self: center;
margin: 5px 0 5px auto;
color: #fff;
font-size: 14px;
background: #1A7BE6;
}
.rmc-calendar .confirm-panel .button-disable {
color: #aaa;
background: #d5d5d5;
}
.rmc-calendar .confirm-panel .button-full {
margin: 5px;
width: 100%;
text-align: center;
}
.rmc-calendar .time-picker {
flex-shrink: 0;
text-align: center;
background: #fff;
}
.rmc-calendar .time-picker .title {
font-size: 13px;
padding: 5px 0;
border-top: #E5E4E4 1px solid;
border-bottom: #E5E4E4 1px solid;
}
.rmc-calendar .single-month {
padding: 10px 2px 0;
overflow: hidden;
}
.rmc-calendar .single-month .month-title {
margin-left: 15px;
}
.rmc-calendar .single-month .row {
display: flex;
padding: 3px 0;
}
.rmc-calendar .single-month .row .cell {
display: flex;
flex-direction: column;
width: 14.28571429%;
justify-content: center;
align-items: center;
}
.rmc-calendar .single-month .row .cell .date-wrapper {
display: flex;
height: 35px;
width: 100%;
justify-content: center;
align-items: center;
margin-bottom: 1px;
}
.rmc-calendar .single-month .row .cell .date-wrapper .disable {
color: #aaa;
background: #eee;
border: none;
border-radius: 100%;
}
.rmc-calendar .single-month .row .cell .date-wrapper .date {
display: flex;
justify-content: center;
align-items: center;
width: 35px;
height: 35px;
flex-shrink: 0;
}
.rmc-calendar .single-month .row .cell .date-wrapper .grey {
color: #999;
}
.rmc-calendar .single-month .row .cell .date-wrapper .important {
border: 1px #999 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: 100%;
}
.rmc-calendar .single-month .row .cell .date-wrapper .date-selected {
border: none;
background: #1a7be6;
color: #fff;
}
.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 {
height: 15px;
width: 100%;
padding: 0 5px;
font-size: 12px;
color: #999;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-align: center;
}
.rmc-calendar .single-month .row .cell .date-selected {
color: #1a7be6;
}
.rmc-calendar .single-month .row + .row {
margin-top: 6px;
}
.rmc-calendar .single-month .row-xl + .row-xl {
margin-top: 21px;
}
.rmc-calendar .shortcut-panel {
display: flex;
flex-direction: row;
flex-shrink: 0;
justify-content: space-between;
padding: 8px 20px;
border-top: #E5E4E4 1px solid;
}
.rmc-calendar .shortcut-panel .item {
display: inline-block;
color: #068EEF;
font-size: 14px;
}