react-native-calendars

React Native Calendars : How to change the background color of only one item using Redux

吃可爱长大的小学妹 提交于 2021-01-29 11:07:13
问题 I'm trying to change the background of only one item in this agenda but with my code, when I click on an item, it changes the background color of all of them and not just the one I clicked : Before clicked after clicked. I want also to store the value of my state in redux so that I can display the screen elsewhere in my application while conserving the green color. Here is my code from my calendar: import React, {useState, useCallback, useEffect} from 'react'; import { Text, View,

Don't want to select date react-native-calendars Agenda

允我心安 提交于 2019-12-25 01:37:49
问题 native app and using Agenda of react-native calendars. I am using knob to open agenda as shown in the gif https://raw.githubusercontent.com/wix/react-native-calendars/master/demo/agenda.gif but if user don't want to select or want to cancel this operation what they will do. I want knob to close that agenda. Or something to cancel operation please help. Thanks in advance!!! 回答1: You can use Modal component for that purpose. Render Calendar inside Modal where you can add a cancel button. 来源: