@@ -57,25 +57,27 @@ export default class Day extends React.Component {
57
57
< TouchableWithoutFeedback activeOpacity = { 1 } style = { dayStyle } >
58
58
< View style = { { ...dayStyle , height : Math . floor ( DEVICE_WIDTH / 7 ) , justifyContent : 'center' } } >
59
59
< Text style = { { ...textDayStyle , textAlign : "center" , width : Math . floor ( DEVICE_WIDTH / 7 ) , backgroundColor : 'transparent' , fontSize : Math . floor ( DEVICE_WIDTH / 26 ) } } > { moment ( day . date , 'YYYYMMDD' ) . date ( ) } </ Text >
60
- { day . date == moment ( ) . format ( "YYYYMMDD" ) ? ( < View style = { { position : 'absolute' , top :0 , bottom :0 , left :0 , right : 0 , justifyContent : 'center' } } > < Text style = { { fontSize : Math . floor ( DEVICE_WIDTH / 17 ) , fontWeight : 'bold' , color : '#ccc' , textAlign : 'center' } } > __</ Text > </ View > ) : null }
60
+ { day . date == moment ( ) . format ( "YYYYMMDD" ) ? ( < View style = { { position : 'absolute' , top :0 , bottom :0 , left :0 , right : 0 , justifyContent : 'center' , backgroundColor : 'transparent' } } > < Text style = { { fontSize : Math . floor ( DEVICE_WIDTH / 17 ) , fontWeight : 'bold' , color : '#ccc' , textAlign : 'center' } } > __</ Text > </ View > ) : null }
61
61
</ View >
62
62
</ TouchableWithoutFeedback >
63
63
) ;
64
- else if ( day . type == 'blockout' )
64
+ else if ( day . type == 'blockout' ) {
65
+ const strikeTop = Math . floor ( DEVICE_WIDTH / - 22 ) ;
65
66
return (
66
67
< TouchableWithoutFeedback activeOpacity = { 1 } style = { dayStyle } >
67
68
< View style = { { ...dayStyle , height : Math . floor ( DEVICE_WIDTH / 7 ) , justifyContent : 'center' } } >
68
69
< Text style = { { ...textDayStyle , textAlign : "center" , width : Math . floor ( DEVICE_WIDTH / 7 ) , backgroundColor : 'transparent' , fontSize : Math . floor ( DEVICE_WIDTH / 26 ) } } > { moment ( day . date , 'YYYYMMDD' ) . date ( ) } </ Text >
69
- < View style = { { position : 'absolute' , top :- 23 , bottom :0 , left :0 , right : 0 , justifyContent : 'center' } } > < Text style = { { fontSize : Math . floor ( DEVICE_WIDTH / 17 ) , color : '#ccc' , textAlign : 'center' } } > __</ Text > </ View >
70
+ < View style = { { position : 'absolute' , top : strikeTop , bottom :0 , left :0 , right : 0 , justifyContent : 'center' , backgroundColor : 'transparent '} } > < Text style = { { fontSize : Math . floor ( DEVICE_WIDTH / 17 ) , color : '#ccc' , textAlign : 'center' } } > __</ Text > </ View >
70
71
</ View >
71
72
</ TouchableWithoutFeedback >
72
73
) ;
74
+ }
73
75
else
74
76
return (
75
77
< TouchableWithoutFeedback activeOpacity = { 1 } style = { dayStyle } onPress = { ( ) => this . props . onSelectDate ( moment ( day . date , 'YYYYMMDD' ) ) } >
76
78
< View style = { { ...dayStyle , height : Math . floor ( DEVICE_WIDTH / 7 ) , justifyContent : 'center' } } >
77
79
< Text style = { { ...textDayStyle , textAlign : "center" , width : Math . floor ( DEVICE_WIDTH / 7 ) , backgroundColor : 'transparent' , fontSize : Math . floor ( DEVICE_WIDTH / 26 ) } } > { moment ( day . date , 'YYYYMMDD' ) . date ( ) } </ Text >
78
- { day . date == moment ( ) . format ( "YYYYMMDD" ) ? ( < View style = { { position : 'absolute' , top :0 , bottom :0 , left :0 , right : 0 , justifyContent : 'center' } } > < Text style = { { fontSize : Math . floor ( DEVICE_WIDTH / 17 ) , fontWeight : 'bold' , color : dayProps . selectedBackgroundColor , textAlign : 'center' } } > __</ Text > </ View > ) : null }
80
+ { day . date == moment ( ) . format ( "YYYYMMDD" ) ? ( < View style = { { position : 'absolute' , top :0 , bottom :0 , left :0 , right : 0 , justifyContent : 'center' , backgroundColor : 'transparent' } } > < Text style = { { fontSize : Math . floor ( DEVICE_WIDTH / 17 ) , fontWeight : 'bold' , color : dayProps . selectedBackgroundColor , textAlign : 'center' } } > __</ Text > </ View > ) : null }
79
81
</ View >
80
82
</ TouchableWithoutFeedback >
81
83
) ;
0 commit comments