react-nativecalendarreact-native-calendars

react-native-calendars moved 1 day forward


At the time of creating the post, it was Friday 30th. For some reason, my calendar displays this day as Saturday:

enter image description here

My Calendar code:

          <Calendar
            style={{width: Dimensions.get('screen').width - 10}}
            theme={{
              selectedDayBackgroundColor: '#00adf5',
              selectedDayTextColor: '#ffffff',
              dotColor: '#00adf5',
            }}
            onDayPress={this.onDaySelect}
            markedDates={this.state.markedDates}
            markingType="single"
            minDate={minDate}
            maxDate={maxDate}
            disableAllTouchEventsForDisabledDays={true}
          />

Solution

  • Go to this file location

    react-native-calenders -> src -> calendar -> header -> index.js
    

    and changed

    let weekDaysNames = weekDayNames(this.props.firstDay);
    to 
    let weekDaysNames = weekDayNames(6);
    

    I have faced the same issue

    I have resolved this issue from the above solution