question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OnDayPress doesn't respond

See original GitHub issue

Description

OnDayPress didnt respond to some devices

Expected Behavior

i’m expectiing this function works fine like always

Observed Behavior

Last week i tried run my project on new device, it works fine for few days n then it didn’t give any respond when i clicked the date (OnDayPress), i’d try to console.log but still no effect (it still give me animation like pressed but no effect at all). Anyway it still works fine in another device n emulator on that day, but this morning i found that the other device starting to not respond too. Firstly i thought it was expo version but when i checked these two devices has different version of expo (2.21.5 and 2.19.6), now the emulator still works fine (expo ver 2.19.6) but the problem is i’m developing expo push notification and it wont work on emulator.

here’s my code: <Calendar onDayPress={(day) => { // console.log(day, “ini harinya”); setSelectedDay(day.dateString); //to mark the selected day setShowModal(!showModal); setDayFilter( day.day < 10 && day.month < 10 ? 0${day.day}/0${day.month}/${day.year} : day.day < 10 && day.month >= 10 ? 0${day.day}/${day.month}/${day.year} : day.day >= 10 && day.month < 10 ? ${day.day}/0${day.month}/${day.year} : day.day >= 10 && day.month >= 10 ? ${day.day}/${day.month}/${day.year} : null ); setHariIni(day.day); }} minDate={format(new Date(), “yyyy-MM-dd”)} maxDate={addMonths(new Date(), 1)} disableAllTouchEventsForDisabledDays={true} markingType={“custom”} markedDates={mergeMark} />

Environment

Please run these commands in the project folder and fill in their results:

  • yarn list react-native-calendars: react-native-calendars@1.1264.0
  • yarn list react-native: react-native@0.63.2

Also specify:

  1. Device & OS version: Poco F3, Android 11
  2. Device & OS version: ASUS_X008DA (Zenfone series), Android 7.0

Reproducible Demo

Screenshots

the issue : https://user-images.githubusercontent.com/64129000/125367753-f20bd180-e3a2-11eb-8762-a69ba8d91b9b.mp4

expected behavior: https://user-images.githubusercontent.com/64129000/125368157-d94feb80-e3a3-11eb-8f21-020b9842b613.mp4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
sharanrprasadcommented, Aug 2, 2021

Experiencing same behaviour while running on Samsung Galaxy s8 as well.

1reaction
stale[bot]commented, Sep 27, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

this.setState() not working properly in react native
onDayPress i am calling a function that recieves date as argument and update my state attribute "startDate" using this.
Read more >
react-native-calendars - npm
Start using react-native-calendars in your project by running `npm i ... If you change markedDates object content but the reference to it does...
Read more >
Create customized and shareable calendars in React Native
Learn how to create customized and shareable calendars in React Native, ... onDayPress : When the user taps a specific day element ...
Read more >
Low-Code Calendar Component - The Draftbit Community
First, we need to import the react-native-calendars package. ... return ( <Calendar onDayPress={day => { console.log('selected day', ...
Read more >
rerender child component from parent component-React Native
Accepted answer. constructor(props) { super(props) this.state = { } this.onDayPress = this.onDayPress } showCalendar = () => { return ( <Calendar ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found