react-native-calendars: endingDay & startingDay are not displayed correct on Android.
Description
endingDay and startingDay =true doesn’t works properly on Android working without Expo. It works when using expo.
Expected Behavior
Marking with rounded edges.
Observed Behavior
Marking as a rectangle ( as if it had startingDay & endingDay = false).

Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-calendars
: 1.20.0npm ls react-native
: 0.57.1
Emulator Nexus 5 : API 28 (Android 9) Huawei Mediapad M5: API 26 (Android 8)
Reproducible Demo
mDates[“2018-10-05”] = { startingDay: true, color: lockColor, textColor:‘black’, endingDay: true, selection:false}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 8
- Comments: 16
Commits related to this issue
- solve the bug #642 — committed to afresh/react-native-calendars by afresh 6 years ago
- Merge pull request #1 from afresh/fix-period solve the bug #642 — committed to afresh/react-native-calendars by afresh 6 years ago
- Fix for issue #642 — committed to tedscape/react-native-calendars by deleted user 6 years ago
as mentioned from @ahanriat , to fix this we need add
overflow: hidden
into base stylesheet from day period. And since the PR still not merged https://github.com/wix/react-native-calendars/pull/728 , you can try to solve the issue like this :+1
npm ls react-native-calendars: 1.21.0 npm ls react-native: 0.57.5
Having the same issue on android (works fine on iOS). It’s only present after a selection is made on the calendar. If a period is sent to the calendar on open, it rounds the corners properly.
on load:
after new selection:
@elgalesmana In the first load, marked dates are shown correctly. I’m passing the
markedDates
from the state, but the broderRadius disspear from the starting date once the component is updated (oncemarkedDates
are changed)I’ll conduct a bit more investigation and if it happens to be a correct fix I’ll propose a PR 🤗
You can use prop dayComponent to pass your own day component. It works for me.
@tamer-mohamed you need to update the
markedDates
state values. you can do this withonDayPress
like in this plugin https://github.com/lazaronixon/react-native-date-range-picker/blob/master/DateRangePicker.js