MonthPanel.less 2.18 KB
Newer Older
liang ce committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
.@{prefixClass}-month-panel {
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background: #ffffff;
  z-index: 10;
  position: absolute;
  outline: none;
}

.@{prefixClass}-month-panel-hidden {
  display: none;
}

.@{prefixClass}-month-panel-header {
  padding: 0 10px;
  height: 34px;
  line-height: 30px;
  position: relative;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  border-bottom: 1px solid #ccc;

  > a {
    font-weight: bold;
    display: inline-block;
    padding: 4px 5px;
    text-align: center;
    width: 30px;

    &:hover {
      cursor: pointer;
      color: #23c0fa;
    }
  }
}

.@{prefixClass}-month-panel-prev-year-btn,
.@{prefixClass}-month-panel-next-year-btn {
  position: absolute;
  top: 0;
}

.@{prefixClass}-month-panel-next-year-btn {
  &:after {
    content: '»';
  }
}

.@{prefixClass}-month-panel-prev-year-btn {
  user-select: none;
  left: 0;

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

.@{prefixClass}-month-panel .@{prefixClass}-month-panel-year-select {
  width: 180px;
}

.@{prefixClass}-month-panel-year-select-arrow {
  display: none;
}

.@{prefixClass}-month-panel-next-year-btn {
  user-select: none;
  right: 0;
}

.@{prefixClass}-month-panel-body {
  padding: 9px 10px 10px;
  position: absolute;
  top: 34px;
  bottom: 0;
}

.@{prefixClass}-month-panel-table {
  table-layout: fixed;
  width: 100%;
  height: 100%;
  border-collapse: separate;
}

.@{prefixClass}-month-panel-cell {
  text-align: center;

  .@{prefixClass}-month-panel-month {
    display: block;
    width: 46px;
    margin: 0 auto;
    color: #666;
    border-radius: 4px 4px;
    height: 36px;
    padding: 0;
    background: transparent;
    line-height: 36px;
    text-align: center;

    &:hover {
      background: #ebfaff;
      cursor: pointer;
    }
  }

  &-disabled {
    .@{prefixClass}-month-panel-month {
      color: #bfbfbf;

      &:hover {
        background: white;
        cursor: not-allowed;
      }
    }
  }
}

.@{prefixClass}-month-panel-selected-cell .@{prefixClass}-month-panel-month {
  background: #3fc7fa;
  color: #fff;

  &:hover {
    background: #3fc7fa;
    color: #fff;
  }
}

.@{prefixClass}-month-header-wrap {
  position: relative;
  height: 308px;
}