react-native-calendars 向前移动了 1 天
react-native-calendars moved 1 day forward
创建 post 时是 30 号星期五。出于某种原因,我的日历将这一天显示为星期六:
enter image description here
我的日历代码:
<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}
/>
转到此文件位置
react-native-calenders -> src -> calendar -> header -> index.js
并改变了
let weekDaysNames = weekDayNames(this.props.firstDay);
to
let weekDaysNames = weekDayNames(6);
我遇到了同样的问题
我已经通过上述解决方案解决了这个问题
创建 post 时是 30 号星期五。出于某种原因,我的日历将这一天显示为星期六:
enter image description here
我的日历代码:
<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}
/>
转到此文件位置
react-native-calenders -> src -> calendar -> header -> index.js
并改变了
let weekDaysNames = weekDayNames(this.props.firstDay);
to
let weekDaysNames = weekDayNames(6);
我遇到了同样的问题
我已经通过上述解决方案解决了这个问题