Marking type period selects always same month
See original GitHub issueDescription
When the markingType
is set to period
the onDayPress callback always return a day on the default month and automatically switches to default month even if no onDayPress is passed in properties
Expected Behavior
The callback should return the current selected date, as when any other markingType
is set
Observed Behavior
Environment
npm ls react-native-calendars
: react-native-calendars@1.1279.0npm ls react-native
: react-native@0.64.3
Also specify:
- Device/emulator/simulator & OS version:
Emulator: Pixel_2_API_29 Device: Redmi Note 7 Android 10
Reproducible Demo
export default function App() {
const [show, setShow] = useState(false);
const [selectedDate, setSelectedDate] = useState("");
return (
<View>
<Calendar
onDayPress={(data) => {
console.log(data);
setSelectedDate(data.dateString);
}}
markingType="period"
/>
<Text>{selectedDate}</Text>
</View>
);
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:10
Top Results From Across the Web
Use conditional formatting to give your calendar a visual refresh
Use conditional formatting to give your calendar a visual refresh · From your Calendar folder, select View > View Settings. · Select Conditional...
Read more >Excel conditional formatting for dates & time: formulas and rules
Select one of the date options from the drop-down list in the left-hand part of the window, ranging from last month to next...
Read more >Calendar marking react-native-calendars - Stack Overflow
Currently when I click a date nothing happens. I'm guessing I'm supposed to detect a click and change the markedDates dict accordingly, but...
Read more >Create customized and shareable calendars in React Native
Want to display a quick summary of a few bookings in a calendar? Try the multi-period marking type. Customizing the calendar theme. Now,...
Read more ><input type="date"> - HTML: HyperText Markup Language
The second problem is the more serious one; with date input supported, the value is normalized to the format yyyy-mm-dd . But with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same issue with the most recent release (1.1279.0). The issue does not occur in 1.1278.0.
react-native-calendars: 1.1279.0
react-native: 0.64.3
Testing on physical device with iOS 15.3.1
yes, i was also facing the same issue. then switch back to version 1.1276.0 and start working. seems like many things are broken in the latest version. or the documentation is not upto date.