@@ -3,7 +3,7 @@ import {StyleSheet, View, ScrollView, Text, TouchableOpacity} from 'react-native
33import { Calendar , CalendarUtils } from 'react-native-calendars' ;
44import testIDs from '../testIDs' ;
55
6- const INITIAL_DATE = '2022-07 -06' ;
6+ const INITIAL_DATE = '2024-11 -06' ;
77
88const CalendarScreen = ( ) => {
99 const [ selected , setSelected ] = useState ( INITIAL_DATE ) ;
@@ -135,11 +135,10 @@ const CalendarScreen = () => {
135135 current = { INITIAL_DATE }
136136 minDate = { getDate ( - 5 ) }
137137 displayLoadingIndicator
138- markingType = { 'period' }
139138 theme = { {
140139 calendarBackground : '#333248' ,
141140 textSectionTitleColor : 'white' ,
142- textSectionTitleDisabledColor : 'gray ' ,
141+ textSectionTitleDisabledColor : 'pink ' ,
143142 dayTextColor : 'red' ,
144143 todayTextColor : 'white' ,
145144 selectedDayTextColor : 'white' ,
@@ -161,6 +160,7 @@ const CalendarScreen = () => {
161160 }
162161 }
163162 } }
163+ markingType = { 'period' }
164164 markedDates = { {
165165 [ getDate ( - 2 ) ] : { disabled : true } ,
166166 [ getDate ( 1 ) ] : { textColor : 'pink' } ,
@@ -172,9 +172,11 @@ const CalendarScreen = () => {
172172 [ getDate ( 26 ) ] : { color : 'gray' } ,
173173 [ getDate ( 27 ) ] : { endingDay : true , color : 'gray' }
174174 } }
175- disabledDaysIndexes = { [ 3 ] }
176- disabledByWeekDays = { [ 3 ] }
175+ firstDay = { 1 }
176+ disabledDaysIndexes = { [ 1 ] }
177+ disabledByWeekDays = { [ 1 ] }
177178 disableAllTouchEventsForDisabledDays
179+ onDayPress = { ( day ) => console . warn ( `${ day . dateString } pressed` ) }
178180 />
179181 </ Fragment >
180182 ) ;
@@ -200,7 +202,7 @@ const CalendarScreen = () => {
200202 }
201203 } ,
202204 [ getDate ( 11 ) ] : { color : '#70d7c7' , textColor : 'white' , marked : true , dotColor : 'white' } ,
203- [ getDate ( 12 ) ] : { color : '#70d7c7' , inactive : true } ,
205+ [ getDate ( 12 ) ] : { color : '#70d7c7' , inactive : true , marked : true } ,
204206 [ getDate ( 13 ) ] : {
205207 endingDay : true ,
206208 color : '#50cebb' ,
@@ -215,7 +217,8 @@ const CalendarScreen = () => {
215217 } }
216218 theme = { {
217219 textInactiveColor : '#a68a9f' ,
218- textSectionTitleDisabledColor : 'grey' ,
220+ inactiveDotColor : '#a68a9f'
221+ , textSectionTitleDisabledColor : 'grey' ,
219222 textSectionTitleColor : '#319e8e' ,
220223 arrowColor : '#319e8e'
221224 } }
0 commit comments