xwt
2025-06-27 0d3eadb50310ca60b8871e967e64da01aa25a9ad
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
@import '../style/var';
 
.van-calendar {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: @calendar-background-color;
 
  &__popup {
    &.van-popup--top,
    &.van-popup--bottom {
      height: @calendar-popup-height;
    }
 
    &.van-popup--left,
    &.van-popup--right {
      height: 100%;
    }
 
    .van-popup__close-icon {
      top: 11px;
    }
  }
 
  &__header {
    flex-shrink: 0;
    box-shadow: @calendar-header-box-shadow;
  }
 
  &__month-title,
  &__header-title,
  &__header-subtitle {
    height: @calendar-header-title-height;
    font-weight: @font-weight-bold;
    line-height: @calendar-header-title-height;
    text-align: center;
  }
 
  &__header-title {
    font-size: @calendar-header-title-font-size;
  }
 
  &__header-subtitle {
    font-size: @calendar-header-subtitle-font-size;
  }
 
  &__month-title {
    font-size: @calendar-month-title-font-size;
  }
 
  &__weekdays {
    display: flex;
  }
 
  &__weekday {
    flex: 1;
    font-size: @calendar-weekdays-font-size;
    line-height: @calendar-weekdays-height;
    text-align: center;
  }
 
  &__body {
    flex: 1;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
 
  &__days {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    user-select: none;
  }
 
  &__month-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    color: @calendar-month-mark-color;
    font-size: @calendar-month-mark-font-size;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
 
  &__day,
  &__selected-day {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
 
  &__day {
    position: relative;
    width: 14.285%;
    height: @calendar-day-height;
    font-size: @calendar-day-font-size;
    cursor: pointer;
 
    &--end,
    &--start,
    &--start-end,
    &--multiple-middle,
    &--multiple-selected {
      color: @calendar-range-edge-color;
      background-color: @calendar-range-edge-background-color;
    }
 
    &--start {
      border-radius: @border-radius-md 0 0 @border-radius-md;
    }
 
    &--end {
      border-radius: 0 @border-radius-md @border-radius-md 0;
    }
 
    &--start-end,
    &--multiple-selected {
      border-radius: @border-radius-md;
    }
 
    &--middle {
      color: @calendar-range-middle-color;
 
      &::after {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background-color: currentColor;
        opacity: @calendar-range-middle-background-opacity;
        content: '';
      }
    }
 
    &--disabled {
      color: @calendar-day-disabled-color;
      cursor: default;
    }
  }
 
  &__top-info,
  &__bottom-info {
    position: absolute;
    right: 0;
    left: 0;
    font-size: @calendar-info-font-size;
    line-height: @calendar-info-line-height;
 
    @media (max-width: 350px) {
      font-size: 9px;
    }
  }
 
  &__top-info {
    top: 6px;
  }
 
  &__bottom-info {
    bottom: 6px;
  }
 
  &__selected-day {
    width: @calendar-selected-day-size;
    height: @calendar-selected-day-size;
    color: @calendar-selected-day-color;
    background-color: @calendar-selected-day-background-color;
    border-radius: @border-radius-md;
  }
 
  &__footer {
    flex-shrink: 0;
    padding: 0 @padding-md;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
 
    &--unfit {
      padding-bottom: 0;
    }
  }
 
  &__confirm {
    height: @calendar-confirm-button-height;
    margin: @calendar-confirm-button-margin;
  }
}