Skip to content

Commit 128ddcc

Browse files
committed
fix first weekday offset
1 parent c250abf commit 128ddcc

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: components/Calendar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export default class Calendar extends Component {
178178

179179
do {
180180
const
181-
dayIndex = renderIndex - offset + 1,
181+
dayIndex = renderIndex - offset,
182182
isoWeekday = (renderIndex + weekStart) % 7;
183183

184184
let

Diff for: components/TopBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const TopBar = ({
8989
style={topBarStyles.centredContent}
9090
onPress={onTitlePress}>
9191
{customTitleView ||
92-
<View>
92+
<View style={{flexDirection: "row", alignItems: "center"}}>
9393
<Text style={[topBarStyles.title, customStyle.title]}>
9494
{localizedMonth} {year}
9595
</Text>

Diff for: example/react-native-calendar/components/Calendar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export default class Calendar extends Component {
178178

179179
do {
180180
const
181-
dayIndex = renderIndex - offset + 1,
181+
dayIndex = renderIndex - offset,
182182
isoWeekday = (renderIndex + weekStart) % 7;
183183

184184
let

Diff for: example/react-native-calendar/components/TopBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const TopBar = ({
8989
style={topBarStyles.centredContent}
9090
onPress={onTitlePress}>
9191
{customTitleView ||
92-
<View>
92+
<View style={{flexDirection: "row", alignItems: "center"}}>
9393
<Text style={[topBarStyles.title, customStyle.title]}>
9494
{localizedMonth} {year}
9595
</Text>

0 commit comments

Comments
 (0)