@momo-kits/calendar 0.0.74-beta → 0.72.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +17 -16
- package/publish.sh +2 -2
- package/src/Calendar.js +476 -343
- package/src/CalendarPro.js +391 -318
- package/src/Day/index.js +215 -175
- package/src/Day/style.js +114 -116
- package/src/HeaderControl.js +65 -61
- package/src/LunarDateConverter.js +186 -179
- package/src/LunarService.js +76 -40
- package/src/Month/index.js +74 -65
- package/src/MonthList.js +232 -237
- package/src/TabHeader.js +60 -67
- package/src/Util.js +273 -193
- package/src/calendarPicker/Day.js +120 -128
- package/src/calendarPicker/Days.js +208 -181
- package/src/calendarPicker/HeaderControls.js +145 -136
- package/src/calendarPicker/WeekDaysLabels.js +18 -13
- package/src/calendarPicker/index.js +100 -100
- package/src/calendarPicker/styles.js +175 -176
- package/src/calendarPicker/util.js +75 -41
- package/src/holidayData.js +121 -123
package/src/Day/index.js
CHANGED
|
@@ -1,193 +1,233 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
import React, {Component} from 'react';
|
|
3
2
|
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
TouchableHighlight,
|
|
7
|
-
Text
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
import { Colors, SwitchLanguage } from '@momo-kits/core';
|
|
3
|
+
import {TouchableHighlight, View} from 'react-native';
|
|
4
|
+
import {Colors, Spacing, Text} from '@momo-kits/core-v2';
|
|
10
5
|
import style from './style';
|
|
11
6
|
|
|
12
7
|
class Day extends Component {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
chooseDay = () => {
|
|
19
|
-
const { onChoose, date } = this.props;
|
|
20
|
-
onChoose && onChoose(date);
|
|
21
|
-
};
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
this.statusCheck();
|
|
11
|
+
}
|
|
22
12
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return holidays.find((item) => item.day === day && item.month === month);
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
};
|
|
13
|
+
chooseDay = () => {
|
|
14
|
+
const {onChoose, date} = this.props;
|
|
15
|
+
onChoose && onChoose(date);
|
|
16
|
+
};
|
|
31
17
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
18
|
+
findHoliday = (date, holidays) => {
|
|
19
|
+
if (date && holidays && holidays.length > 0) {
|
|
20
|
+
const day = date.date();
|
|
21
|
+
const month = date.month() + 1;
|
|
22
|
+
return holidays.find(item => item.day === day && item.month === month);
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
minDate,
|
|
46
|
-
maxDate,
|
|
47
|
-
empty,
|
|
48
|
-
index,
|
|
49
|
-
isShowLunar,
|
|
50
|
-
tabSelected,
|
|
51
|
-
isDoubleDateMode,
|
|
52
|
-
lunarDate,
|
|
53
|
-
isSolarHoliday,
|
|
54
|
-
isLunarHoliday,
|
|
55
|
-
price
|
|
56
|
-
} = props || this.props;
|
|
57
|
-
this.isValid = date && (date >= minDate || date.isSame(minDate, 'day')) && (date <= maxDate || date.isSame(maxDate, 'day'));
|
|
58
|
-
this.isMid = isDoubleDateMode && date > startDate && date < endDate
|
|
59
|
-
|| (!date && empty >= startDate && empty <= endDate);
|
|
60
|
-
this.isStart = date && date.isSame(startDate, 'd');
|
|
61
|
-
this.isStartPart = this.isStart && endDate;
|
|
62
|
-
this.isEnd = isDoubleDateMode && date && date.isSame(endDate, 'day');
|
|
63
|
-
this.isFocus = this.isMid || this.isStart || this.isEnd;
|
|
64
|
-
this.isWeekEnd = index === 6 || index === 5;
|
|
65
|
-
this.showLunar = isShowLunar;
|
|
66
|
-
this.lunarDate = lunarDate;
|
|
67
|
-
this.isDoubleDateMode = isDoubleDateMode;
|
|
68
|
-
this.isLunarHoliday = isLunarHoliday;
|
|
69
|
-
this.isLunarDayStart = this.lunarDate && this.lunarDate.lunarDay === 1;
|
|
70
|
-
this.isSolarHoliday = isSolarHoliday;
|
|
71
|
-
this.isInScope = isDoubleDateMode ? (tabSelected === 0 || (tabSelected === 1 && startDate && date && date.isSameOrAfter(startDate, 'day'))) : true;
|
|
72
|
-
return this.isFocus || this.diffPrice;
|
|
27
|
+
checkHoliday = (date, holidays) => {
|
|
28
|
+
const holiday = this.findHoliday(date, holidays);
|
|
29
|
+
return {
|
|
30
|
+
solarHoliday: !!(holiday && !holiday.lunar),
|
|
31
|
+
lunarHoliday: !!(holiday && holiday.lunar),
|
|
73
32
|
};
|
|
33
|
+
};
|
|
74
34
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
35
|
+
statusCheck = props => {
|
|
36
|
+
const {
|
|
37
|
+
startDate,
|
|
38
|
+
endDate,
|
|
39
|
+
date = null,
|
|
40
|
+
minDate,
|
|
41
|
+
maxDate,
|
|
42
|
+
empty,
|
|
43
|
+
index,
|
|
44
|
+
isShowLunar,
|
|
45
|
+
isDoubleDateMode,
|
|
46
|
+
lunarDate,
|
|
47
|
+
isSolarHoliday,
|
|
48
|
+
isLunarHoliday,
|
|
49
|
+
} = props || this.props;
|
|
50
|
+
this.isValid =
|
|
51
|
+
date &&
|
|
52
|
+
(date >= minDate || date.isSame(minDate, 'day')) &&
|
|
53
|
+
(date <= maxDate || date.isSame(maxDate, 'day'));
|
|
54
|
+
this.isMid =
|
|
55
|
+
(isDoubleDateMode && date > startDate && date < endDate) ||
|
|
56
|
+
(!date && empty >= startDate && empty <= endDate);
|
|
57
|
+
this.isStart = date && date.isSame(startDate, 'd');
|
|
58
|
+
this.isStartPart = this.isStart && endDate;
|
|
59
|
+
this.isEnd = isDoubleDateMode && date && date.isSame(endDate, 'day');
|
|
60
|
+
this.isFocus = this.isMid || this.isStart || this.isEnd;
|
|
61
|
+
this.isWeekEnd = index === 6 || index === 5;
|
|
62
|
+
this.showLunar = isShowLunar;
|
|
63
|
+
this.lunarDate = lunarDate;
|
|
64
|
+
this.isDoubleDateMode = isDoubleDateMode;
|
|
65
|
+
this.isLunarHoliday = isLunarHoliday;
|
|
66
|
+
this.isLunarDayStart = this.lunarDate && this.lunarDate.lunarDay === 1;
|
|
67
|
+
this.isSolarHoliday = isSolarHoliday;
|
|
68
|
+
this.isInScope = true;
|
|
69
|
+
return this.isFocus || this.diffPrice;
|
|
70
|
+
};
|
|
96
71
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
72
|
+
shouldComponentUpdate(nextProps) {
|
|
73
|
+
const {
|
|
74
|
+
isDoubleDateMode,
|
|
75
|
+
isShowLunar,
|
|
76
|
+
tabSelected,
|
|
77
|
+
isSolarHoliday,
|
|
78
|
+
isLunarHoliday,
|
|
79
|
+
price,
|
|
80
|
+
isBestPrice,
|
|
81
|
+
startDate,
|
|
82
|
+
endDate,
|
|
83
|
+
} = this.props;
|
|
84
|
+
const prevStatus = this.isFocus;
|
|
85
|
+
const selectionModeChange = isDoubleDateMode !== nextProps.isDoubleDateMode;
|
|
86
|
+
const lunarChange = isShowLunar !== nextProps.isShowLunar;
|
|
87
|
+
const nextStatus = this.statusCheck(nextProps);
|
|
88
|
+
const tabChange = tabSelected !== nextProps.tabSelected;
|
|
89
|
+
const solarHoliday = isSolarHoliday !== nextProps.isSolarHoliday;
|
|
90
|
+
const lunarHoliday = isLunarHoliday !== nextProps.isLunarHoliday;
|
|
91
|
+
const diffPrice =
|
|
92
|
+
price !== nextProps.price && isBestPrice !== nextProps.isBestPrice;
|
|
93
|
+
const startDateChange =
|
|
94
|
+
startDate && !startDate?.isSame?.(nextProps.startDate, 'day');
|
|
95
|
+
const endDateChange =
|
|
96
|
+
endDate && !endDate?.isSame?.(nextProps.endDate, 'day');
|
|
97
|
+
return !!(
|
|
98
|
+
prevStatus !== nextStatus ||
|
|
99
|
+
selectionModeChange ||
|
|
100
|
+
lunarChange ||
|
|
101
|
+
tabChange ||
|
|
102
|
+
solarHoliday ||
|
|
103
|
+
lunarHoliday ||
|
|
104
|
+
diffPrice ||
|
|
105
|
+
startDateChange ||
|
|
106
|
+
endDateChange
|
|
107
|
+
);
|
|
108
|
+
}
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
{this.isValid && this.isInScope
|
|
112
|
-
? (
|
|
113
|
-
<TouchableHighlight
|
|
114
|
-
style={[
|
|
115
|
-
style.day,
|
|
116
|
-
(this.isStart || this.isEnd) && style.focused
|
|
117
|
-
]}
|
|
118
|
-
underlayColor="rgba(255, 255, 255, 0.35)"
|
|
119
|
-
onPress={this.chooseDay}
|
|
120
|
-
>
|
|
121
|
-
<>
|
|
122
|
-
<Text style={[
|
|
123
|
-
style.dayText,
|
|
124
|
-
this.isWeekEnd && style.weekendDay,
|
|
125
|
-
this.isSolarHoliday && style.weekendDay,
|
|
126
|
-
(this.isStart || this.isEnd) && style.focusedText,
|
|
127
|
-
]}
|
|
128
|
-
>
|
|
129
|
-
{text}
|
|
130
|
-
</Text>
|
|
131
|
-
{
|
|
132
|
-
this.lunarDate && this.showLunar && (
|
|
133
|
-
<Text style={[
|
|
134
|
-
style.lunarDayText,
|
|
135
|
-
(this.isLunarHoliday || this.isLunarDayStart) && style.weekendDay,
|
|
136
|
-
(this.isStart || this.isEnd) && style.focusedText,
|
|
137
|
-
]}
|
|
138
|
-
>
|
|
139
|
-
{this.lunarDate.lunarDay === 1 ? `${this.lunarDate.lunarDay}/${this.lunarDate.lunarMonth}` : this.lunarDate.lunarDay}
|
|
140
|
-
</Text>
|
|
141
|
-
)
|
|
142
|
-
}
|
|
143
|
-
</>
|
|
144
|
-
</TouchableHighlight>
|
|
145
|
-
)
|
|
146
|
-
: (
|
|
147
|
-
<View style={[style.day]}>
|
|
148
|
-
<Text style={[
|
|
149
|
-
style.dayText,
|
|
150
|
-
style.dayTextDisabled,
|
|
151
|
-
]}
|
|
152
|
-
>
|
|
153
|
-
{text}
|
|
154
|
-
</Text>
|
|
155
|
-
{
|
|
156
|
-
this.lunarDate && this.showLunar && text ? (
|
|
157
|
-
<Text style={[
|
|
158
|
-
style.lunarDayText,
|
|
159
|
-
style.dayTextDisabled,
|
|
160
|
-
]}
|
|
161
|
-
>
|
|
162
|
-
{this.lunarDate.lunarDay === 1 ? `${this.lunarDate.lunarDay}/${this.lunarDate.lunarMonth}` : this.lunarDate.lunarDay}
|
|
163
|
-
</Text>
|
|
164
|
-
) : <View />
|
|
165
|
-
}
|
|
166
|
-
</View>
|
|
167
|
-
)}
|
|
168
|
-
</View>
|
|
110
|
+
render() {
|
|
111
|
+
const {date, empty, price, isBestPrice, disabledWeekend} = this.props;
|
|
169
112
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
113
|
+
const text = date ? date.date() : '';
|
|
114
|
+
return (
|
|
115
|
+
<View style={style.dayContainer}>
|
|
116
|
+
<View
|
|
117
|
+
style={[
|
|
118
|
+
this.isMid && !empty && style.mid,
|
|
119
|
+
this.isStartPart && style.dayStartContainer,
|
|
120
|
+
this.isEnd && style.dayEndContainer,
|
|
121
|
+
]}>
|
|
122
|
+
{this.isValid && this.isInScope ? (
|
|
123
|
+
<TouchableHighlight
|
|
124
|
+
disabled={disabledWeekend && this.isWeekEnd}
|
|
125
|
+
style={[
|
|
126
|
+
style.day,
|
|
127
|
+
{
|
|
128
|
+
paddingVertical: !!price ? Spacing.XS : Spacing.S,
|
|
129
|
+
},
|
|
130
|
+
(this.isStart || this.isEnd) && style.focused,
|
|
131
|
+
]}
|
|
132
|
+
underlayColor="rgba(255, 255, 255, 0.35)"
|
|
133
|
+
onPress={this.chooseDay}>
|
|
134
|
+
<>
|
|
135
|
+
{this.lunarDate && this.showLunar && (
|
|
136
|
+
<Text.Label4
|
|
137
|
+
style={[
|
|
138
|
+
style.lunarDayText,
|
|
139
|
+
(this.isLunarHoliday || this.isLunarDayStart) &&
|
|
140
|
+
style.weekendDay,
|
|
141
|
+
(this.isStart || this.isEnd) && style.focusedText,
|
|
142
|
+
]}>
|
|
143
|
+
{this.lunarDate.lunarDay === 1
|
|
144
|
+
? `${this.lunarDate.lunarDay}/${this.lunarDate.lunarMonth}`
|
|
145
|
+
: this.lunarDate.lunarDay}
|
|
146
|
+
</Text.Label4>
|
|
176
147
|
)}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
148
|
+
<Text.Label1
|
|
149
|
+
style={[
|
|
150
|
+
style.dayText,
|
|
151
|
+
{paddingTop: !!price ? 4 : 0},
|
|
152
|
+
this.isWeekEnd && style.weekendDay,
|
|
153
|
+
this.isSolarHoliday && style.weekendDay,
|
|
154
|
+
(this.isStart || this.isEnd) && style.focusedText,
|
|
155
|
+
this.isWeekEnd && disabledWeekend && style.disabledWeekend,
|
|
156
|
+
]}>
|
|
157
|
+
{text}
|
|
158
|
+
</Text.Label1>
|
|
159
|
+
{!!price ? (
|
|
160
|
+
<Text.Label3
|
|
161
|
+
style={[
|
|
162
|
+
this.isValid && this.isInScope
|
|
163
|
+
? style.price
|
|
164
|
+
: style.dayTextDisabled,
|
|
165
|
+
isBestPrice && {
|
|
166
|
+
color: Colors.pink_03,
|
|
167
|
+
},
|
|
168
|
+
(this.isStart || this.isEnd) && {
|
|
169
|
+
color: Colors.black_01,
|
|
170
|
+
},
|
|
171
|
+
]}>
|
|
172
|
+
{price}
|
|
173
|
+
</Text.Label3>
|
|
174
|
+
) : (
|
|
175
|
+
<View
|
|
176
|
+
style={{
|
|
177
|
+
paddingBottom: this.props.havePriceList ? Spacing.S : 0,
|
|
178
|
+
}}
|
|
179
|
+
/>
|
|
183
180
|
)}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
181
|
+
</>
|
|
182
|
+
</TouchableHighlight>
|
|
183
|
+
) : (
|
|
184
|
+
<View
|
|
185
|
+
style={[
|
|
186
|
+
style.day,
|
|
187
|
+
{
|
|
188
|
+
paddingVertical: !!price
|
|
189
|
+
? Spacing.XS + Spacing.XXS
|
|
190
|
+
: Spacing.S,
|
|
191
|
+
},
|
|
192
|
+
]}>
|
|
193
|
+
{this.lunarDate && this.showLunar && text ? (
|
|
194
|
+
<Text.Label4
|
|
195
|
+
style={[style.lunarDayText, style.dayTextDisabled]}>
|
|
196
|
+
{this.lunarDate.lunarDay === 1
|
|
197
|
+
? `${this.lunarDate.lunarDay}/${this.lunarDate.lunarMonth}`
|
|
198
|
+
: this.lunarDate.lunarDay}
|
|
199
|
+
</Text.Label4>
|
|
200
|
+
) : (
|
|
201
|
+
<View />
|
|
202
|
+
)}
|
|
203
|
+
<Text.Action2 style={[style.dayText, style.dayTextDisabled]}>
|
|
204
|
+
{text}
|
|
205
|
+
</Text.Action2>
|
|
206
|
+
{text && !!price ? (
|
|
207
|
+
<Text.Label3
|
|
208
|
+
style={[
|
|
209
|
+
this.isValid && this.isInScope
|
|
210
|
+
? style.price
|
|
211
|
+
: style.dayTextDisabled,
|
|
212
|
+
isBestPrice && {
|
|
213
|
+
color: Colors.pink_03,
|
|
214
|
+
},
|
|
215
|
+
]}>
|
|
216
|
+
{price}
|
|
217
|
+
</Text.Label3>
|
|
218
|
+
) : (
|
|
219
|
+
<View
|
|
220
|
+
style={{
|
|
221
|
+
paddingBottom: this.props.havePriceList ? Spacing.S : 0,
|
|
222
|
+
}}
|
|
223
|
+
/>
|
|
224
|
+
)}
|
|
188
225
|
</View>
|
|
189
|
-
|
|
190
|
-
|
|
226
|
+
)}
|
|
227
|
+
</View>
|
|
228
|
+
</View>
|
|
229
|
+
);
|
|
230
|
+
}
|
|
191
231
|
}
|
|
192
232
|
|
|
193
233
|
export default Day;
|
package/src/Day/style.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Colors
|
|
1
|
+
import {Dimensions} from 'react-native';
|
|
2
|
+
import {Spacing, Colors} from '@momo-kits/core-v2';
|
|
3
3
|
|
|
4
4
|
const dayWidth = (Dimensions.get('window').width - 38) / 7;
|
|
5
5
|
const SCREEN_WIDTH = Dimensions.get('window').width;
|
|
6
|
-
const SCREEN_DPI_WIDTH =
|
|
6
|
+
const SCREEN_DPI_WIDTH = SCREEN_WIDTH * Dimensions.get('window').scale;
|
|
7
7
|
const IPHONE_4_5_WIDTH = 640;
|
|
8
8
|
const dayTextSize = SCREEN_DPI_WIDTH === IPHONE_4_5_WIDTH ? 13 : 15;
|
|
9
9
|
const lunarTextSize = SCREEN_DPI_WIDTH === IPHONE_4_5_WIDTH ? 8 : 10;
|
|
@@ -11,119 +11,117 @@ const priceTextSize = SCREEN_DPI_WIDTH === IPHONE_4_5_WIDTH ? 8 : 10;
|
|
|
11
11
|
const lineHeightDayText = 1.3 * dayTextSize;
|
|
12
12
|
const lineHeightLunarText = 1.3 * lunarTextSize;
|
|
13
13
|
const lineHeightPriceText = 1.3 * priceTextSize;
|
|
14
|
-
const containerDayHeight =
|
|
14
|
+
const containerDayHeight =
|
|
15
|
+
lineHeightDayText + lineHeightLunarText + lineHeightPriceText + 10;
|
|
15
16
|
const heightDefault = lineHeightDayText + lineHeightLunarText;
|
|
16
17
|
export default {
|
|
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
|
-
color: '#8d919d'
|
|
127
|
-
},
|
|
128
|
-
lineHeightPriceText
|
|
18
|
+
dayContainer: {
|
|
19
|
+
width: dayWidth,
|
|
20
|
+
borderRadius: 4,
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
height: containerDayHeight,
|
|
23
|
+
},
|
|
24
|
+
disabledWeekend: {color: Colors.red_07},
|
|
25
|
+
day: {
|
|
26
|
+
width: dayWidth,
|
|
27
|
+
overflow: 'hidden',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
borderRadius: 4,
|
|
31
|
+
},
|
|
32
|
+
dayText: {
|
|
33
|
+
textAlign: 'center',
|
|
34
|
+
},
|
|
35
|
+
lunarDayText: {
|
|
36
|
+
width: dayWidth,
|
|
37
|
+
textAlign: 'right',
|
|
38
|
+
paddingRight: Spacing.XS,
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
top: Spacing.XXS,
|
|
41
|
+
color: Colors.black_12,
|
|
42
|
+
},
|
|
43
|
+
todayText: {
|
|
44
|
+
color: 'blue',
|
|
45
|
+
},
|
|
46
|
+
weekendDay: {
|
|
47
|
+
color: Colors.red_05,
|
|
48
|
+
},
|
|
49
|
+
dayTextDisabled: {
|
|
50
|
+
opacity: 0.4,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
focused: {
|
|
54
|
+
backgroundColor: Colors.pink_03,
|
|
55
|
+
},
|
|
56
|
+
focusedText: {
|
|
57
|
+
fontWeight: 'bold',
|
|
58
|
+
color: 'white',
|
|
59
|
+
},
|
|
60
|
+
dayStartContainer: {
|
|
61
|
+
borderTopLeftRadius: 4,
|
|
62
|
+
borderBottomLeftRadius: 4,
|
|
63
|
+
backgroundColor: Colors.pink_03,
|
|
64
|
+
},
|
|
65
|
+
dayEndContainer: {
|
|
66
|
+
borderTopRightRadius: 4,
|
|
67
|
+
borderBottomRightRadius: 4,
|
|
68
|
+
backgroundColor: Colors.pink_03,
|
|
69
|
+
},
|
|
70
|
+
mid: {
|
|
71
|
+
backgroundColor: Colors.pink_09,
|
|
72
|
+
// height: heightDefault
|
|
73
|
+
},
|
|
74
|
+
departLabel: {
|
|
75
|
+
position: 'absolute',
|
|
76
|
+
backgroundColor: 'yellow',
|
|
77
|
+
width: 20,
|
|
78
|
+
height: 20,
|
|
79
|
+
borderRadius: 10,
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
},
|
|
83
|
+
returnLabel: {
|
|
84
|
+
position: 'absolute',
|
|
85
|
+
backgroundColor: 'yellow',
|
|
86
|
+
width: 20,
|
|
87
|
+
height: 20,
|
|
88
|
+
borderRadius: 10,
|
|
89
|
+
justifyContent: 'center',
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
top: 0,
|
|
92
|
+
right: 0,
|
|
93
|
+
},
|
|
94
|
+
containerDayHeight,
|
|
95
|
+
txtBack: {
|
|
96
|
+
position: 'absolute',
|
|
97
|
+
backgroundColor: '#ffbb1e',
|
|
98
|
+
borderRadius: 100,
|
|
99
|
+
top: -2,
|
|
100
|
+
right: -2,
|
|
101
|
+
zIndex: 999,
|
|
102
|
+
padding: 2,
|
|
103
|
+
width: 15,
|
|
104
|
+
height: 15,
|
|
105
|
+
justifyContent: 'center',
|
|
106
|
+
alignItems: 'center',
|
|
107
|
+
},
|
|
108
|
+
txtGo: {
|
|
109
|
+
position: 'absolute',
|
|
110
|
+
backgroundColor: '#ffbb1e',
|
|
111
|
+
top: -2,
|
|
112
|
+
left: -2,
|
|
113
|
+
borderRadius: 100,
|
|
114
|
+
padding: 2,
|
|
115
|
+
zIndex: 999,
|
|
116
|
+
width: 15,
|
|
117
|
+
height: 15,
|
|
118
|
+
justifyContent: 'center',
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
},
|
|
121
|
+
price: {
|
|
122
|
+
color: Colors.black_15,
|
|
123
|
+
marginTop: -4,
|
|
124
|
+
lineHeight: 14,
|
|
125
|
+
},
|
|
126
|
+
lineHeightPriceText,
|
|
129
127
|
};
|